home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!saimiri.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!stein.u.washington.edu!adrian
- From: adrian@stein.u.washington.edu (Adrian Mariano)
- Newsgroups: comp.unix.shell
- Subject: Re: multiple sub's with 'sed'
- Date: 23 Jan 1993 17:29:42 GMT
- Organization: University of Washington
- Lines: 18
- Message-ID: <1jrva6INNd3g@shelley.u.washington.edu>
- References: <19891@mindlink.bc.ca> <C19uz1.43t@mentor.cc.purdue.edu>
- NNTP-Posting-Host: stein.u.washington.edu
-
- In <C19uz1.43t@mentor.cc.purdue.edu> davisre@sage.cc.purdue.edu (Robert Davis) writes:
-
- > sed's w command writes the pattern space to a file, creating
- >the file if it does not exist, and *overwriting* it if it does. You
- >want it to *append* the pattern space to $FILE, but sed does not have
- >an option for that.
-
- This is false (at least for my version of sed under Ultrix 4.2). As
- documented in my man page and as revealed by actuals tests, the 'w'
- command appends to the specified file.
-
- When I tried writing with 'w' to the same file that I was reading from
- I got an empty file.
-
-
-
-
-
-