Why doesn't \c work in sh/ksh echo on Suns?

Guy Harris guy at gorodish.Sun.COM
Fri Aug 5 09:15:28 AEST 1988


> echo is a utility program, not a shell built-in, on SunOS.

Guess again.  Ever since SunOS 3.0, the SunOS Bourne shell has been based on
the System V shell (3.x has the S5R2 version, 4.0 has the S5R3.1 version), so
"echo" is most definitely built into the SunOS Bourne shell.

We also supply the "echo" utility, but then so does AT&T.

> The manual page suggests that you choose the version you want by the
> placement of /usr/bin and /usr/5bin in your search path.  I checked
> this on a machine that runs Version 3.2.

Yup.  This even affects the built-in versions, because of the trick mentioned
in an earlier article.  (From Griff Smith's article, it sounds as if the Korn
shell's version of this trick involves actually looking for the "echo" program
to see where it finds it, rather than just seeing whether "/usr/5bin" appears
before "/bin" and "/usr/bin" in the path; the latter is what the SunOS Bourne
shell does.)



More information about the Comp.unix.questions mailing list