From: Roy Marples Date: Mon, 20 Jan 2014 15:19:11 +0000 (+0000) Subject: Fix trim sed fallback X-Git-Tag: v6.3.0~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=908c170da0c429ccff69c0ce8ab2bc642939b6d0;p=thirdparty%2Fdhcpcd.git Fix trim sed fallback --- diff --git a/dhcpcd-run-hooks.in b/dhcpcd-run-hooks.in index 1bcbd495..e0ad618c 100644 --- a/dhcpcd-run-hooks.in +++ b/dhcpcd-run-hooks.in @@ -69,7 +69,7 @@ trim() if [ -z "$var" ]; then # So it seems our shell doesn't support wctype(3) patterns # Fall back to sed - var=$(echo "$var" | sed -e 's/^[ \t]*//;s/[ \t]*$//') + var=$(echo "$*" | sed -e 's/^[[:space:]]*//;s/[[:space:]]*$//') fi printf %s "$var" }