git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
668e4a6
)
Portable count.
author
Maxim Mamontov
<faust.madf@gmail.com>
Sat, 25 Oct 2014 01:53:55 +0000
(
04:53
+0300)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Sat, 25 Oct 2014 01:53:55 +0000
(
04:53
+0300)
functest/functions
patch
|
blob
|
history
diff --git
a/functest/functions
b/functest/functions
index 183ddc4affea66cbfdb61508bfa05ec6868ec51b..51a1fd32477b20231326eed90d42a6402ac49e88 100644
(file)
--- 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
}