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

Re: sed deleting file

by choroba (Cardinal)
on Dec 06, 2010 at 16:42 UTC ( [id://875651]=note: print w/replies, xml ) Need Help??


in reply to sed deleting file

You should not write to the same file you are reading. You can use sed's -i~ flag to change the file "in place", or save the output under a different name.
Update: sorry, misread the question.

Replies are listed 'Best First'.
Re^2: sed deleting file
by ddrew78 (Beadle) on Dec 06, 2010 at 16:43 UTC
    I'm not...if you look, the file I'm writing to has a "1" at the end

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found