Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!daveb From: daveb@laidbak.UUCP (Dave Burton) Newsgroups: comp.unix.questions Subject: Re: Why doesn't \c work in sh/ksh echo on Suns? Message-ID: <1568@laidbak.UUCP> Date: 5 Aug 88 04:20:33 GMT Article-I.D.: laidbak.1568 References: <19256@tut.cis.ohio-state.edu> Reply-To: daveb@laidbak.UUCP (Dave Burton) Organization: is pretty bad/My method of Lines: 27 In article <19256@tut.cis.ohio-state.edu> lvc@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. 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? SunOS is a 4BSD derived OS, and on 4BSD echo with no newline is echo -n "string " Sys3?, Sys5.x et.al. use echo "string \c" echo is not a builtin on earlier versions of sh (like the one with 4BSD), thus with sh, echo is /bin/echo ala 4BSD. echo is a builtin on ksh. ksh tries to configure itself to the target system at compile time. To maintain shell script compatability, the makefile determines which kind of echo /bin/echo is, then alters the compilation of ksh to that behaviour. -- Dave Burton | ``/* You are not expected to understand this. */'' ihnp4!laidbak!daveb | (312) 505-9100 x325 | Disclaimer: I channel only for myself.