From: Johannes Sixt Date: Sun, 6 Nov 2016 19:31:19 +0000 (+0100) Subject: t0021: compute file size with a single process instead of a pipeline X-Git-Tag: v2.11.0-rc1~10^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ec2e8b3da21c884325c9764abc62251fcfbe6208 t0021: compute file size with a single process instead of a pipeline Avoid unwanted coding patterns (prodigal use of pipelines), and in particular a useless use of cat. Signed-off-by: Johannes Sixt Signed-off-by: Jeff King --- diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index db71acacb3..cb72fa49de 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -22,7 +22,7 @@ generate_random_characters () { } file_size () { - cat "$1" | wc -c | sed "s/^[ ]*//" + perl -e 'print -s $ARGV[0]' "$1" } filter_git () {