
Laurent_R
Veteran
/ Moderator
Dec 7, 2012, 10:12 AM
Post #2 of 5
(15142 views)
|
Re: [jaggims] Search and replace help : Perl one liner
[In reply to]
|
Can't Post
|
|
perl -p -i -e 's/$existing_string/$replacing_string/g' category.file If you use this one-liner, this cannot work, since the $existing_string and $replacing_string variables have not been defined anywhere in the script, so that the script does know what you want to match and by what you want the matched pattern to be replaced. Actually, I don't know either what you want to replace by what. You don't give enough information for us to help you. If you said something like "I want to replace 'cellName5' by 'Cell_name5'", I would immediately know what to suggest. But, here, we don't really know.
|