Echo

Geoff Clare gwc at root.co.uk
Mon Dec 5 20:45:09 AEST 1988


In article <14799 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>
>Have echo work as in BSD; use printf(1) to produce escapes.  I tried
>to post printf to comp.sources.unix, but it seems it never made it.

- but then you lose the advantage of echo being a shell builtin.
This will have a very noticable effect on speed for scripts which print
a lot of escapes.

Personally, I think fewest existing scripts would break if the SysV
behaviour were adopted, but with the '-n' option added.  There can't
be that many BSD scripts which contain '\' in an echo string, whereas
use of '\c' in SysV scripts is extremely common.

X/Open specifies SysV behaviour for echo.  What does POSIX say?
-- 

Geoff Clare    UniSoft Limited, Saunderson House, Hayne Street, London EC1A 9HH
gwc at root.co.uk   ...!mcvax!ukc!root44!gwc   +44-1-606-7799  FAX: +44-1-726-2750



More information about the Comp.unix.wizards mailing list