]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid non portable sed use of \t
authorPádraig Brady <P@draigBrady.com>
Thu, 14 Feb 2013 04:27:34 +0000 (04:27 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 14 Feb 2013 14:49:31 +0000 (14:49 +0000)
* tests/du/threshold.sh: use `cut` rather than
sed to avoid using the non portable \t which
fails on sed on openbsd 5 at least.
Also remove a redundant call to `tr` and avoid
explicit setting of LANG=C which is done globally.

tests/du/threshold.sh

index 95e9aedf687c9512b0a4fc2cf3b0afd8085290a1..ee5217dbce7e3f20de72f7e297b4182a712d6391 100644 (file)
@@ -121,14 +121,14 @@ dutest ()
   if [ "$exp" = "" ] ; then
     touch exp
   else
-    printf "%s " $exp | tr ' ' "\n" > exp
+    printf "%s\n" $exp > exp
   fi
 
   rc=0
   du -B1 $args a > out1 2>&1 || { cat out1 ; rc=1 ; }
 
   # Remove the size column and sort the output.
-  sed 's/^[0-9]*\t//' < out1 | LANG=C sort -o out || framework_failure_
+  cut -f2- out1 | sort > out || framework_failure_
 
   compare exp out || { cat out1 ; rc=1 ; }
   return $rc