Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2016-02-09 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (301 votes), past polls