Echo

Leo de Wit leo at philmds.UUCP
Sat Dec 17 19:58:29 AEST 1988


In article <723 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
   [lines deleted...]
|Doing
|
|	(PATH=/usr/5bin:$PATH echo "\tthis is a test\n")
|
|provides a workaround; this also "does what you want", at least under
|SunOS 4.0, and doesn't smash PATH; the parentheses force the "echo" to
|be done in a subshell, and probably forces PATH to be modified there as
|well.

Quoting the 'echo' command will force no builtin to be used; it will
also prevent an alias from being evaluated (at least both in the csh
and a Bourne-ish shell I use here). So probably something like

	PATH=/usr/5bin:$PATH \echo "\tthis is a test\n"

or

	PATH=/usr/5bin:$PATH "echo" "\tthis is a test\n"

will suffice (no subshell needed).

       Leo.



More information about the Comp.unix.wizards mailing list