How to change the .abcd in each line of xyz.abc to -ABCD? using perl ?

If I understand correctly, "xyz.abc" is the name of the file. Do:

perl -i.orig -pe 's/\.abcd/-ABCD/g' xyz.abc

("xyz.abc" will be modified. The original is saved as "xyz.abc.orig".)
 
Back
Top