summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-02-14 04:27:34 +0000
committerPádraig Brady <P@draigBrady.com>2013-02-14 14:49:31 +0000
commit4f03385e9b96e163bed1fbbb8d63aeeb5fac4e90 (patch)
treed3fb721a2ace405b8451d7d87946839c0c72a49a
parent302564444383169087fbbec36983789abbac9aa5 (diff)
downloadcoreutils-4f03385e9b96e163bed1fbbb8d63aeeb5fac4e90.tar.gz
coreutils-4f03385e9b96e163bed1fbbb8d63aeeb5fac4e90.tar.bz2
coreutils-4f03385e9b96e163bed1fbbb8d63aeeb5fac4e90.zip
tests: avoid non portable sed use of \t
* 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.
-rw-r--r--tests/du/threshold.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/du/threshold.sh b/tests/du/threshold.sh
index 95e9aedf6..ee5217dbc 100644
--- a/tests/du/threshold.sh
+++ b/tests/du/threshold.sh
@@ -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