diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-12-11 04:42:59 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-12-11 04:42:59 +0000 |
commit | b95aac31803e64c766f4f0a097938366c7e3cee1 (patch) | |
tree | 4d2487554eb380324886c3bb14e2af2fbe58932f | |
parent | b9bb1b58fe4efbe95f44755af7d5f71eccbbe1d2 (diff) | |
download | coreutils-b95aac31803e64c766f4f0a097938366c7e3cee1.tar.xz |
tests: avoid warnings due to new filefrag -v format
* tests/cp/sparse-fiemap.sh: Newer versions of filefrag output
more fields, in different orders, so handle that to avoid warnings.
-rwxr-xr-x | tests/cp/sparse-fiemap.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cp/sparse-fiemap.sh b/tests/cp/sparse-fiemap.sh index 47ddf2943..59b7db38d 100755 --- a/tests/cp/sparse-fiemap.sh +++ b/tests/cp/sparse-fiemap.sh @@ -64,7 +64,8 @@ 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>=6 ? $6 : (NF<5 ? $NF : $5)) } + END {print ""}' } for i in $(seq 1 2 21); do |