logo       

SunOS sparc sed users: msg#00075

editors.sed.user

Subject: SunOS sparc sed users

I'm trying to locate a bug in sparc/Sun sed, running SunOS version
5.9. I'm getting this problem:

******BEGIN COPIED OUTPUT******
gmurik@Zapata: /idn/dm/home/gmurik/unix/sed> uname -a
SunOS splma503 5.9 Generic_118558-11 sun4u sparc SUNW,Netra-T12
gmurik@Zapata: /idn/dm/home/gmurik/unix/sed> cat 6lines
6th
5th
4th
3rd
2nd
last
gmurik@Zapata: /idn/dm/home/gmurik/unix/sed> wc -l 6lines
6 6lines
gmurik@Zapata: /idn/dm/home/gmurik/unix/sed> sed -e '$!{h;d;};x' 6lines
last

******END COPIED OUTPUT********

By my way of thinking (and after trying it out here several times),
the output of

sed -e '$!{h;d;};x' 6lines

should have been "2nd" instead of "last". I cannot diagnose what is
wrongly happening here. I've tried working with several other
versions of sed (gsed, ssed, csed, sed16, etc., including sedsed) and
I cannot figure out what's wrong here. That little script OUGHT to
print the 2nd to the last line, not the last line! Is it a bug in the
SunOS sed?

Can any Sun users help me out?

--
Eric Pement - eric.pement@xxxxxxxxx
Educational Technical Services, MBI



------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/dkFolB/TM
--------------------------------------------------------------------~->

--

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/sed-users/

<*> To unsubscribe from this group, send an email to:
sed-users-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise