Use tr for replacing whitespace to newline

Close #824
This commit is contained in:
topjohnwu 2018-12-05 20:07:15 -05:00
parent 109891d668
commit fd4faf59b8

View File

@ -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() {