Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: multi-line in-place edits

by halley (Prior)
on Feb 15, 2005 at 19:23 UTC ( #431302=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -p -i -e 'BEGIN { print "{" } END { print "}" }' filename.txt
    
  2. or download this
    echo "{" >tmp
    cat filename.txt >>tmp
    echo "}" >>tmp
    mv tmp filename.txt
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://431302]
help
Chatterbox?
What's the matter? Cat got your tongue?...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2016-12-06 20:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (117 votes). Check out past polls.