Hi,
I’m using the following command to get a collection of files, so we can get a dev instance running of the live site. Now, this is what I use:
perl -p -i -e "s|paypal\@site.net|paypal\@site.net|g" `grep -rl 'paypal@site.net' .`
That works well - APART from when no instances of paypal@site.net can be found. In that case, it just sits there indefinitely.If you just run the command outside of the backticks, then it runs through fine:
grep -rl 'paypal@site.net' .
but as soon as you put the other command in front of it (and grab the files via the `` section), it just locks up if nothing can be found.
So, my question is - can we run this kinda of command to search+replace - but have it not lock up if no instances are found?
TIA
Andy