home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.shell:3079 comp.unix.questions:9252
- Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!rdsunx!montnaro
- From: montnaro@ausable.crd.ge.com (Skip Montanaro)
- Newsgroups: comp.unix.shell,comp.unix.questions
- Subject: What's wrong with this sed command?
- Message-ID: <MONTNARO.92Jul21160321@ausable.crd.ge.com>
- Date: 21 Jul 92 21:03:21 GMT
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: montanaro@crd.ge.com (Skip Montanaro)
- Followup-To: poster
- Distribution: comp
- Organization: GE Corporate Research & Development, Schenectady, NY
- Lines: 24
- Nntp-Posting-Host: ausable.crd.ge.com
-
-
- I'm trying to use sed to trim off all leading "./" patterns from source
- filenames in make rules. On an IBM RS6000 the following works as I expected:
-
- echo 'enquire.o: ./././enquire.c' | sed 's?: \(\./\)\{1,\}?: ?'
-
- yielding
-
- enquire.o: enquire.c
-
- On our other systems (Sun-4, HP, SGI, and Motorola 68040) it prints
- different results. The HP doesn't trim any "./" patterns, while the Sun,
- Moto, and SGI all trim one pattern.
-
- Have I incorrectly specified the sed command or are one (or more) of the
- vendors' sed implementations incorrect? If so, which one(s)? I'm inclined to
- believe the IBM is correct and the others are bugged.
-
- (I suppose this is another argument for perl...)
-
- Thanks,
-
- --
- Skip (montanaro@crd.ge.com)
-