Why doesn't \c work in sh/ksh echo on Suns?
Chuck Karish
karish at denali.stanford.edu
Fri Aug 5 01:52:25 AEST 1988
In article <19256 at tut.cis.ohio-state.edu> lvc at tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
>On the Sun 3/50's here at Ohio State University sh and ksh don't
>work correctly when echo is given a string that terminates with
>a \c.
echo is a utility program, not a shell built-in, on SunOS. It sounds
as if you're getting the BSD echo rather than the Sys5 echo. BSD echo
suppresses the newline with the '-n' command line flag, not with a '\c'
in the string.
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.
Another approach, which should work anywhere, would be to do
echo "Enter terminal type:" | tr '\012' ' '
Chuck Karish ARPA: karish at denali.stanford.edu
BITNET: karish%denali at forsythe.stanford.edu
UUCP: {decvax,hplabs!hpda}!mindcrf!karish
USPS: 1825 California St. #5 Mountain View, CA 94041
More information about the Comp.unix.questions
mailing list