From fd4faf59b8ba6d7d112341895411e0eb063336a1 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 5 Dec 2018 20:07:15 -0500 Subject: [PATCH] Use tr for replacing whitespace to newline Close #824 --- scripts/util_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index d553d89fa..03cb017b7 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -139,7 +139,7 @@ get_flags() { grep_cmdline() { local REGEX="s/^$1=//p" - sed -E 's/ +/\n/g' /proc/cmdline | sed -n "$REGEX" 2>/dev/null + cat /proc/cmdline | tr '[:space:]' '\n' | sed -n "$REGEX" 2>/dev/null } grep_prop() {