awk replace string in file with variable
awk -i inplace -v cuv1="$word" -v cuv2="$replace" '{gsub(cuv1,cuv2); print;}' "$file"
Simpler solutions using sed and perl:
sed -i "s/$word/$replace/g" "$file"
perl -i -pe "s/$word/$replace/g" "$file"
awk replace string in file with variable
awk -i inplace -v cuv1="$word" -v cuv2="$replace" '{gsub(cuv1,cuv2); print;}' "$file"
Simpler solutions using sed and perl:
sed -i "s/$word/$replace/g" "$file"
perl -i -pe "s/$word/$replace/g" "$file"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us