Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!think!paperboy!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.unix.wizards Subject: Re: Possible bug in SunOS System V echo? Message-ID: <709@mwtech.UUCP> Date: 9 Apr 90 14:47:29 GMT References: <4852@helios.TAMU.EDU> <12545@smoke.BRL.MIL> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 32 In article <12545@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <4852@helios.TAMU.EDU> greg@eemips.tamu.edu (Greg Economides) writes: >>Has anyone noticed a strange problem using the 'echo -n' command in >>SunOS 4.0.2? Using the SystemV echo (/usr/5bin/echo) the -n switch >>(which causes NO newline to be output after the echoed text) doesn't >>work. If I give a command like: >>echo -n Hello world >>I get: >>-n Hello world > >That's exactly what you should get using System V "echo". > >This is one of those annoying gratuitous incompatibilities among UNIX >variants. [more deleted] I did wait some days to see if somebody else would mention ... now it seems to be my turn: Note also, that SysV Rel 3 introduces the -n option again to mean "no linefeed". The \c-convention lives on, the programmer has the choice. It seems, that AT&T just waited long enough to cause many programmers headaches how to convert existing scripts and to invent `portable' solutions, and - with the `XENIX compatibility' - the "-n"-option slipped back into SysV. BTW: Everyone who wants to read more about how to supress echo's newline should take a look to "The UNIX Programming Environment" by Kernighan&Pike, page 79 -- you'll find a nice little tale there .... -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83