From 2ab46b57b6d575e31dbfa48a77cd7308c01f5914 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 25 Oct 2014 04:53:55 +0300 Subject: [PATCH] Portable count. --- functest/functions | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functest/functions b/functest/functions index 183ddc4a..51a1fd32 100644 --- a/functest/functions +++ b/functest/functions @@ -33,8 +33,10 @@ count() { if [ "$1" == "" ] then - printf "0\n" + printf "0" else - printf "$1\n" | wc -l + RES=`printf "$1\n" | wc -l` + RES=`trim "$RES"` + printf "$RES" fi } -- 2.44.2