Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: sed deleting file

by cdarke (Prior)
on Dec 07, 2010 at 13:05 UTC ( [id://875792]=note: print w/replies, xml ) Need Help??


in reply to sed deleting file

This is not sed(1) overwriting the output file, it is the shell. Redirection  > pbxiplp1 is a shell operation - if the file already exists it clobbers it (truncates to zero bytes). This is done by the shell before the sed(1) program is executed. By the time poor old sed gets to read the file the data is long gone.

Use perl for this, or redirect to a different filename then rename it.
Misread the question.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found