aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-02-01 18:17:30 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-02-01 18:17:30 +0000
commit4528a563baec1efffd031b00d5b00f30fa3ce1ec (patch)
tree330974626b005c68fd889127b0988ee9e205a64d /rc.d
parent56f03501075d051379b9ccac324d45a80beda9cc (diff)
downloadinitscripts-4528a563baec1efffd031b00d5b00f30fa3ce1ec.tar
initscripts-4528a563baec1efffd031b00d5b00f30fa3ce1ec.tar.gz
initscripts-4528a563baec1efffd031b00d5b00f30fa3ce1ec.tar.bz2
initscripts-4528a563baec1efffd031b00d5b00f30fa3ce1ec.tar.xz
initscripts-4528a563baec1efffd031b00d5b00f30fa3ce1ec.zip
Eliminate creating the second awk process in get_numeric_dev()
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 0a620eb3..e2dfc5f2 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -483,7 +483,7 @@ get_numeric_dev() {
if [ "$1" == "hex" ]; then
fmt="%x:%x"
fi
- ls -l "$2" | awk '{ print $5 $6 }' | awk -F ',' "{ printf \"$fmt\", \$1, \$2 }"
+ ls -l "$2" | awk '{ split($5 $6, a, ","); printf("'"$fmt"'", a[1], a[2]); }'
) 2>/dev/null
}