Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: search and replace

by johngg (Canon)
on Sep 28, 2012 at 08:10 UTC ( [id://996133]=note: print w/replies, xml ) Need Help??


in reply to search and replace

Something like this perhaps.

perl -pi.bak -e 's/^(mail)( xmlfeedback)(.*)/$1$3$2/' *.sh

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: search and replace
by Peamasii (Sexton) on Oct 04, 2012 at 10:38 UTC
    Thank you, this solution worked great! I didn't dive into the Regexp solutions because I suspected there was a simple way to switch those tokens around just like this solution does. I just couldn't find an example anywhere. Thanks again for everyone's help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://996133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-03-19 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found