]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: use $AWK, not awk
authorJim Meyering <meyering@redhat.com>
Wed, 16 May 2012 05:46:51 +0000 (07:46 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 16 May 2012 05:46:51 +0000 (07:46 +0200)
* tests/cp/sparse-fiemap: Don't hard-code "awk".  Use $AWK.
* tests/init.cfg: Likewise.
* tests/misc/sort-rand: Likewise.

tests/cp/sparse-fiemap
tests/init.cfg
tests/misc/sort-rand

index 61e807c05a997eda3b094b31f22f43f44ba75cc9..f2e5f330d4c75accdb28d173c1ad1586e71053f3 100755 (executable)
@@ -64,7 +64,7 @@ fi
 f()
 {
   sed 's/ [a-z,][a-z,]*$//' $@ \
-    | awk '/^ *[0-9]/ {printf "%d %d ", $2, (NF<5 ? $NF : $5) } END {print ""}'
+    | $AWK '/^ *[0-9]/ {printf "%d %d ", $2, (NF<5 ? $NF : $5) } END {print ""}'
 }
 
 for i in $(seq 1 2 21); do
index 2e43c162d47f5a93a71dc351dfc74a2533602a1e..c1cb92fb288407736e6a6319b77af79e79fdaf51 100644 (file)
@@ -183,7 +183,7 @@ require_file_system_bytes_free_()
 {
   local req=$1
   local expr=$(stat -f --printf "$req / %S <= %a" .)
-  awk "BEGIN{ exit !($expr) }" \
+  $AWK "BEGIN{ exit !($expr) }" \
     || skip_ "this test needs at least $req bytes of free space"
 }
 
index 79730e9578fe30e2d0f4287ea84d44d4bdab34e2..1782a9accff2ae5924c8ccc77e88ccb211a3b4ba 100755 (executable)
@@ -35,7 +35,7 @@ compare in out1 || { fail=1; echo "not a permutation" 1>&2; }
 
 # If locale is available then use it to find a random non-C locale.
 if (locale --version) > /dev/null 2>&1; then
-  locale=$(locale -a | sort --random-sort | awk '/^.._/{print;exit}')
+  locale=$(locale -a | sort --random-sort | $AWK '/^.._/{print;exit}')
   LC_ALL=$locale sort --random-sort in > out1 || fail=1
   LC_ALL=$locale sort --random-sort in > out2 || fail=1