X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/2ab46b57b6d575e31dbfa48a77cd7308c01f5914..06186a8866478b05d56179dc2c5a3c4b3fd3a8f4:/functest/functions?ds=sidebyside diff --git a/functest/functions b/functest/functions index 51a1fd32..a90b9dcd 100644 --- a/functest/functions +++ b/functest/functions @@ -40,3 +40,8 @@ count() printf "$RES" fi } + +subst() +{ + sed -i "s|$1|$2|g" "$3" 2> /dev/null || sed -i "" "s|$1|$2|g" "$3" +}