*BSD News Article 86780


Return to BSD News archive

#! rnews 1788 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsxfer.itd.umich.edu!newsxfer3.itd.umich.edu!howland.erols.net!news.mathworks.com!enews.sgi.com!su-news-feed4.bbnplanet.com!ratatosk.yggdrasil.com!news
From: "H.J. Lu" <hjl@lucon.org>
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: Question about sed on different systems
Date: Thu, 23 Jan 1997 07:36:40 -0800
Organization: Lu Consulting
Lines: 29
Message-ID: <32E78588.E4A862@lucon.org>
References: <5c5qo2$c2j@darkstar.ucsc.edu> <5c6qd9$92t@news-central.tiac.net>
NNTP-Posting-Host: ocean.lucon.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.28 i586)
To: rmk@seahag.rmkhome.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.netbsd.misc:5163

Rick Kelly wrote:
> 
> James H. Haynes (haynes@cats.ucsc.edu) wrote:
> : 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).
> 
> I just tried this on SunOS 4.1.4, NetBSD/i386 1.2, and NetBSD/i386 1.0A.
> The output in all three cases was nothing.

Are you sure? May I suggest you do one of the following things:

1. Try it on a VERY slow machine.
2. Try it in a VERY slow tty.
3. Do

# echo -n "AX" | sed -e 's/X//' > /tmp/foo
# vi /tmp/foo

If everything fails, you should consider fixing your system.


H.J.