Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: search/replace one liners without clobbering

by FreeBeerReekingMonk (Deacon)
on Feb 26, 2016 at 21:38 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found