Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: search and replace

by johngg (Abbot)
on Sep 28, 2012 at 08:10 UTC ( #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


Comment on Re: search and replace
Download Code
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
Node Status?
node history
Node Type: note [id://996133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2015-07-29 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls