From 2b9bf3de248de66f8159e7f971a1d5299975d7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Gr=C3=A9goire?= Date: Sat, 19 Aug 2017 18:19:17 -0400 Subject: [PATCH] replace grep+sed by awk --- cdist/conf/explorer/os | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/explorer/os b/cdist/conf/explorer/os index 77c8a76a..d1f3ccb4 100755 --- a/cdist/conf/explorer/os +++ b/cdist/conf/explorer/os @@ -143,7 +143,7 @@ esac if [ -f /etc/os-release ]; then # already lowercase, according to: # https://www.freedesktop.org/software/systemd/man/os-release.html - grep '^ID=' /etc/os-release | sed -e 's|^ID=||' + awk -F= '/^ID=/ {print $2;}' /etc/os-release exit 0 fi