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