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

Lawrence V. Cipriani lvc at tut.cis.ohio-state.edu
Sat Aug 6 12:40:00 AEST 1988


In article <19256 at tut.cis.ohio-state.edu>, I wrote:
> 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.  The output from:
> 
> 	echo "Enter terminal type: \c"
> 
> should be the line "Enter terminal type: " but not terminated with
> a new line (and with the "'s removed).  This works in every other
> sh and ksh echo I've used.  Anyone know what the problem is?

And I thought I was such a shell expert.  Oh well, live and learn.
I changed my profile to use:

	print -n "Enter terminal type: "

I didn't want to fool around with the PATH since the same .profile is
used to login on HP's running HP-UX, and a Pyramid running BSD and Suns
running Sun OS.  Isn't networking fun!

Thanks to everyone that posted or emailed.

-- 
Larry Cipriani, AT&T Network Systems and Ohio State University
Domain: lvc at tut.cis.ohio-state.edu
Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (strange but true)



More information about the Comp.unix.questions mailing list