From: Andrew Ruthven Date: Mon, 14 Jan 2019 10:53:35 +0000 (+1300) Subject: Avoid running grep X-Git-Tag: 1.0.0~1 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06a3ddad69206f3dffe153c5a0e2bf6298b92a8d;p=mythtv-status.git Avoid running grep --- diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index 46542da..44ff0f3 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -44,7 +44,7 @@ else if [ -f /etc/os-release ] then - DISTRO=$(grep ^ID= /etc/os-release | awk -F= '{ print $2 }') + DISTRO=$(awk -F= '$1 == "ID" { print $2 }' /etc/os-release) else DISTRO='unknown' fi