Hello I'm running a bash script to change a keyword on a text file but it is located @ my remote host (10.101.5.91), I tried with this sample code, but it does not change anything on that file, and also no errors to be shown.
changeConfig(){
shopt -s globstar
for file in $1
do
sed -i.bak 's/$2/$3/g' $file
done
}
remoteFunction(){
ssh [email protected] "`declare -f changeConfig`; changeConfig /var/www/file.txt
}
remoteFunction
Can anyone help me? Thankx.... :)