I have a one line perl command that works perfect from the command line (linux), but when trying to use it in another script with the system command, I get:
sh: syntax error near unexpected token `f)'
sh: -c: line 1: `perl -p -i -e 's/template.com/test.com/g;' 0 10 6 4 3 2 1 0find /home/test/* -type f)'
The command:
perl -p -i -e "s/template.com/test.com/g;" $(find /home/test/* -type f)
I tried the following inside my script:
system ("perl -p -i -e 's/template\.com/test\.com/g;' $(find /home/test/* -type f)"
Any suggestion?
sh: syntax error near unexpected token `f)'
sh: -c: line 1: `perl -p -i -e 's/template.com/test.com/g;' 0 10 6 4 3 2 1 0find /home/test/* -type f)'
The command:
perl -p -i -e "s/template.com/test.com/g;" $(find /home/test/* -type f)
I tried the following inside my script:
system ("perl -p -i -e 's/template\.com/test\.com/g;' $(find /home/test/* -type f)"
Any suggestion?