home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5485 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.1 KB

  1. 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
  2. From: adrian@stein.u.washington.edu (Adrian Mariano)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: multiple sub's with 'sed'
  5. Date: 23 Jan 1993 17:29:42 GMT
  6. Organization: University of Washington
  7. Lines: 18
  8. Message-ID: <1jrva6INNd3g@shelley.u.washington.edu>
  9. References: <19891@mindlink.bc.ca> <C19uz1.43t@mentor.cc.purdue.edu>
  10. NNTP-Posting-Host: stein.u.washington.edu
  11.  
  12. In <C19uz1.43t@mentor.cc.purdue.edu> davisre@sage.cc.purdue.edu (Robert Davis) writes:
  13.  
  14. >    sed's w command writes the pattern space to a file, creating
  15. >the file if it does not exist, and *overwriting* it if it does.  You
  16. >want it to *append* the pattern space to $FILE, but sed does not have
  17. >an option for that.
  18.  
  19. This is false (at least for my version of sed under Ultrix 4.2).  As
  20. documented in my man page and as revealed by actuals tests, the 'w'
  21. command appends to the specified file.
  22.  
  23. When I tried writing with 'w' to the same file that I was reading from
  24. I got an empty file.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.