Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 taking refuge in the Monastery: (7)
As of 2016-06-28 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (350 votes). Check out past polls.