From ec2e8b3da21c884325c9764abc62251fcfbe6208 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sun, 6 Nov 2016 20:31:19 +0100 Subject: 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 --- t/t0021-conversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') 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 () { -- cgit v1.2.3