home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10049 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  938 b 

  1. Path: sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!ub!niktow!pavlov
  2. From: pavlov@niktow.canisius.edu (Greg Pavlov)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: more sed questions
  5. Message-ID: <1241@niktow.canisius.edu>
  6. Date: 13 Aug 92 20:11:33 GMT
  7. Article-I.D.: niktow.1241
  8. References: <1992Aug10.152149.13589@cbfsb.cb.att.com>
  9. Organization: Canisius College, Buffalo NY. 14208
  10. Lines: 19
  11.  
  12. In article <1992Aug10.152149.13589@cbfsb.cb.att.com>, ddewar@cbnewsb.cb.att.com (derek.a.dewar) writes:
  13. > Another quick sed question.
  14. > The following sed command is only meant to change the 1st occurrence
  15. > of pattern1, right ?
  16. > sed 's/pattern1/pattern2/1' file
  17. > but when I run it, it insists on changing *every occurrence.
  18.  
  19.   The first occurrence on EACH line.... er,  record..... er string of bytes
  20.   followed by a newline char (UNIX doesn't know the concept of "records",
  21.   right ?...).
  22.  
  23.  
  24.  
  25.  
  26.   pavlov@fstrf.org
  27.