git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use async-radius.
[stg.git]
/
functest
/
functions
diff --git
a/functest/functions
b/functest/functions
index 183ddc4affea66cbfdb61508bfa05ec6868ec51b..a90b9dcd54686e0cc39c488ea42615c24281a400 100644
(file)
--- a/
functest/functions
+++ b/
functest/functions
@@
-33,8
+33,15
@@
count()
{
if [ "$1" == "" ]
then
{
if [ "$1" == "" ]
then
- printf "0
\n
"
+ printf "0"
else
else
- printf "$1\n" | wc -l
+ RES=`printf "$1\n" | wc -l`
+ RES=`trim "$RES"`
+ printf "$RES"
fi
}
fi
}
+
+subst()
+{
+ sed -i "s|$1|$2|g" "$3" 2> /dev/null || sed -i "" "s|$1|$2|g" "$3"
+}