Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rtp47.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!think!mit-eddie!genrad!decvax!mcnc!rti-sel!rtp47!smithrd From: smithrd@rtp47.UUCP (Randy D. Smith) Newsgroups: net.unix,net.bugs Subject: Re: more on echo command Message-ID: <30@rtp47.UUCP> Date: Wed, 24-Apr-85 20:28:24 EST Article-I.D.: rtp47.30 Posted: Wed Apr 24 20:28:24 1985 Date-Received: Sat, 27-Apr-85 02:11:36 EST References: <199@phri.UUCP> <1194@houxm.UUCP> <171@uwvax.UUCP> <547@tesla.UUCP> Reply-To: smithrd@dgux.UUCP (Randy D. Smith) Lines: 33 Keywords: echo, DG/UX Xref: linus net.unix:3721 net.bugs:576 >>> echo "^G\c" >>> only to find out it does not work with UCB 4.2. >> >>With the 4.2BSD csh, the command 'echo -n ^G' works just fine... > > We're beta testing a U**X 4.2/SYS5 on a Data General, and while >echo "kalshf\c" works in sh, the same thing in csh produces... > Oh well, I guess that's why they've got us testing it; who else but >a net reader would care? -mac@tesla.arpa > >____________________________________________________________________________ >On a clear disk you can see forever | >---------------------------------------------------------------------------- `echo "^G\c"` behaves as expected when interpreted by the Bourne shell, while `echo -n "^G"` behaves as expected when interpreted by the csh. "U**X 4.2/SYS5 on a Data General" (a.k.a. DG/UX) gives you the best of both worlds, with both shells, each with the built-in command "echo" behaving as expected. To get Bourne shell behavior from the csh, just use /bin/echo; to get csh behavior from the Bourne shell, exec off a csh to handle the echo. (By the way, the quote given in Knuth is "On a clear disk you can seeK forever". Makes a little more sense that way.) ^ [Please note that the preceding announcement reflects the viewpoint of myself and myself alone. My signature includes my employer's name for information/identification purposes only. This posting should NOT be interpreted as a positional statement by any corporations either living, dead, or otherwise ...] -- Randy D. Smith Data General, Research Triangle Park, NC {the known world}!mcnc!rti-sel!rtp47!smithrd