home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5487 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.5 KB  |  44 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!uwm.edu!spool.mu.edu!news.cs.indiana.edu!noose.ecn.purdue.edu!mentor.cc.purdue.edu!sage.cc.purdue.edu!davisre
  3. From: davisre@sage.cc.purdue.edu (Robert Davis)
  4. Subject: Re: multiple sub's with 'sed'
  5. Message-ID: <C1BsCD.1sr@mentor.cc.purdue.edu>
  6. Sender: news@mentor.cc.purdue.edu (USENET News)
  7. Organization: Purdue University Computing Center
  8. References: <19891@mindlink.bc.ca> <C19uz1.43t@mentor.cc.purdue.edu> <1jrva6INNd3g@shelley.u.washington.edu>
  9. Date: Sat, 23 Jan 1993 21:14:36 GMT
  10. Lines: 32
  11.  
  12. In article <1jrva6INNd3g@shelley.u.washington.edu> adrian@stein.u.washington.edu (Adrian Mariano) writes:
  13. >
  14. >This is false (at least for my version of sed under Ultrix 4.2).  As
  15. >documented in my man page and as revealed by actuals tests, the 'w'
  16. >command appends to the specified file.
  17. >
  18.  
  19.     On the following systems
  20.  
  21.         NeXTSTEP 3.0
  22.         SunOS 4.1.1
  23.         Dynix (BSD 4.3 on a Sequent Symmetry)
  24.         Ardent UNIX 2.1.1 (Sys V on an Ardent Titan)
  25.  
  26. and according to
  27.  
  28.         "sed & awk" by Dale Dougherty (O'Reilly & Assoc., Inc.)
  29.  
  30. sed's w command overwrites rather than appending.  I guess Ultrix 4.2
  31. is nonstandard.
  32.  
  33. >When I tried writing with 'w' to the same file that I was reading from
  34. >I got an empty file.  
  35.  
  36.     Yeah, either way the original script would fail.
  37.  
  38.  
  39. Rob
  40. -- 
  41. | Robert Davis                                    davis@sonata.cc.purdue.edu
  42. | "Look up, Hannah.  Look up."                            NeXT Mail accepted
  43. --
  44.