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

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!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. Message-ID: <1jsl5oINN4da@shelley.u.washington.edu>
  6. Date: 23 Jan 93 23:42:48 GMT
  7. Article-I.D.: shelley.1jsl5oINN4da
  8. References: <19891@mindlink.bc.ca> <C19uz1.43t@mentor.cc.purdue.edu> <1jrva6INNd3g@shelley.u.washington.edu> <C1BsCD.1sr@mentor.cc.purdue.edu>
  9. Organization: University of Washington
  10. Lines: 24
  11. NNTP-Posting-Host: stein.u.washington.edu
  12.  
  13. In <C1BsCD.1sr@mentor.cc.purdue.edu> davisre@sage.cc.purdue.edu (Robert Davis) writes:
  14.  
  15. >In article <1jrva6INNd3g@shelley.u.washington.edu> adrian@stein.u.washington.edu (Adrian Mariano) writes:
  16. >>
  17. >>This is false (at least for my version of sed under Ultrix 4.2).  As
  18. >>documented in my man page and as revealed by actuals tests, the 'w'
  19. >>command appends to the specified file.
  20. >>
  21.  
  22.   [ supporting documentation deleted ]
  23.  
  24. >sed's w command overwrites rather than appending.  I guess Ultrix 4.2
  25. >is nonstandard.
  26.  
  27. I think Ultrix is just like everyone else.  To clear things up, here's
  28. the sed man page section on 'w'.  This is from the Ultrix 4.2 manual,
  29. but the Dynix manual is very similar:
  30.  
  31.      (2)w wfile
  32.              Write.  Append the pattern space to wfile.
  33.  
  34. The use of "append" is somewhat misleading.  The actual behavior is to
  35. overwrite the file that existed before the sed invocation, and then
  36. append thereafter within the same sed program.  
  37.