X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/386e23e3f885b50c833d0c73da3a14965f350359..4077971cebaa4f3d876e53e82a7f60024f4690c2:/functest/functions

diff --git a/functest/functions b/functest/functions
index 183ddc4a..a90b9dcd 100644
--- a/functest/functions
+++ b/functest/functions
@@ -33,8 +33,15 @@ 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
 }
+
+subst()
+{
+    sed -i "s|$1|$2|g" "$3" 2> /dev/null || sed -i "" "s|$1|$2|g" "$3"
+}