Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: search/replace one liners without clobbering

by FreeBeerReekingMonk (Deacon)
on Feb 26, 2016 at 21:38 UTC ( #1156284=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -pi -e 's/\bc?${tgt}[fl]?\b/$tgt/g'  -s -- -tgt=exp *.c;
    
  2. or download this
    perl -pi -e 's/\bc?(exp|log|pow|sqrt|sin|cos|tan|asin|acos|atan|sinh|c
    +osh|tanh|asinh|acosh|atanh)[fl]?\b/$1/g; s/\b[cf]abs[fl]?\b/fabs/g'
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-11-29 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?