*BSD News Article 87238


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!lucy.swin.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!nntp.portal.ca!news.bc.net!info.ucla.edu!agate!news.ucsc.edu!haynes
From: haynes@cats.ucsc.edu (James H. Haynes)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Question about sed on different systems
Date: 22 Jan 1997 19:45:06 GMT
Organization: University of California, Santa Cruz
Lines: 9
Message-ID: <5c5qo2$c2j@darkstar.ucsc.edu>
NNTP-Posting-Host: hobbes.ucsc.edu
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.netbsd.misc:5223

I've just asked this on comp.std.unix to find out what is canonically
correct.  Meanwhile maybe someone can explain the following

echo -n "AX" | sed -e 's/X//'

produces an A on NetBSD and nothing on SunOS 4.1.4   I'm guessing the
difference is something in the C library, as I compiled sed from the 
GNU sources on both platforms.  echo -n "AX" > foo produces an identical
file on both (verified by od -bc foo).