Echo? What echo? Korn shell 88

L. Mark Larsen lml at cbnews.att.com
Sun Oct 21 06:03:20 AEST 1990


In article <90292.140155FISH at LIVERPOOL.AC.UK>, FISH at LIVERPOOL.AC.UK writes:
> I have recently discovered a problem with ksh88. The print command has a flag
> -s that allows you to place things into the history file, i.e.
> 
> print -s Hello there
> 
> will place "Hello there" in the history file. The manual claims that echo
> uses the echo program which means that echo -s should print the string -s.

I tried this with ksh86, ksh88, ksh88e and "echo -s" prints "-s".  Of course,
it is possible that your version of ksh was compiled to exclude echo - it
is an option afterall.  If so, there might be an alias (poorly defined) for it
in your environment.  Try "alias echo" or "whence -v echo" to see.  A proper
alias for echo (if needed) is:

	alias echo='print -'

The '-' ends the argument string for print so, with this alias, your attempt
to do "echo -s" will work as expected.  No need to call /bin/echo.

> Thanks in advance. Any ideas?
> 
> Francis Fish

L. Mark Larsen
lml at atlas.att.com



More information about the Comp.unix.shell mailing list