diff --git a/testing/scripts/function.sh b/testing/scripts/function.sh index 5fbc98293..c162044e5 100755 --- a/testing/scripts/function.sh +++ b/testing/scripts/function.sh @@ -194,10 +194,6 @@ function searchandreplace { # search and replace in each found file the # given string # - - for eachfoundfile in `find $DESTDIR -type f` - do - sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile" - done - + grep -rlZ --exclude='*.pem' "$SEARCHSTRING" $DESTDIR | \ + xargs -0 -I@ sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" @ }