Avoid running grep
authorAndrew Ruthven <andrew@etc.gen.nz>
Mon, 14 Jan 2019 10:53:35 +0000 (23:53 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Mon, 14 Jan 2019 10:53:35 +0000 (23:53 +1300)
bin/mythtv-update-motd

index 46542da..44ff0f3 100755 (executable)
@@ -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