Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!ulysses!ggs From: ggs@ulysses.homer.nj.att.com (Griff Smith) Newsgroups: comp.unix.questions Subject: Re: Why doesn't \c work in sh/ksh echo on Suns? Message-ID: <10493@ulysses.homer.nj.att.com> Date: 4 Aug 88 17:42:35 GMT Article-I.D.: ulysses.10493 References: <19256@tut.cis.ohio-state.edu> Organization: AT&T Bell Laboratories, Murray Hill Lines: 29 Summary: BSD vs. System V In article <19256@tut.cis.ohio-state.edu>, lvc@tut.cis.ohio-state.edu.UUCP 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? > Thanks, | | -- | Larry Cipriani, AT&T Network Systems and Ohio State University | Domain: lvc@tut.cis.ohio-state.edu | Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (strange but true) This is an artifact of the BSD/Sys-V echo differences. Ksh has an ugly kludge in it that tries to guess which echo semantics are expected. You are expecting System V, the Sun is BSD (sort of). To get the System V semantics, put an empty executable file in your private bin (the one that is searched before the system bins) and call it "echo". Don't worry, it won't get executed. Ksh looks through the search list on start-up and makes notes about where it finds "echo". -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: 1-201-582-7736 UUCP: {allegra|ihnp4}!ulysses!ggs Internet: ggs@ulysses.att.com