Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!umich!sharkey!indetech!pacbell!att!cbnewsc!levy From: levy@cbnewsc.ATT.COM (Daniel R. Levy) Newsgroups: comp.unix.wizards Subject: Re: Possible bug in SunOS System V echo? Message-ID: <15488@cbnewsc.ATT.COM> Date: 3 May 90 23:44:51 GMT References: <4852@helios.TAMU.EDU> <14020094@hpisod2.HP.COM> <3851@munnari.oz.au> Organization: AT&T Bell Laboratories, Naperville IL Lines: 27 In article <3851@munnari.oz.au>, kre@cs.mu.oz.au (Robert Elz) writes: > > echo "This is a variable value: $myvar" > As best as I can tell, there's no easy way to reliably print the value > of an unknown variable using the Sys V echo. > > Try > > myvar='\n' > before the 2nd of the above with the V7 (BSD) and Sys V echos. True. There IS a portable-but-ugly way to implement a non-interpreting echo under sh (csh too?): cat << ! This is a variable value: $myvar ! In the example given, this would print This is a variable value: \n under both System V and BSD. -- Daniel R. Levy >>> God: just say "yes" <<< AT&T Bell Laboratories UNIX(R) mail: att!ttbcad!levy, att!cbnewsc!levy 1000 East Warrenville Rd. Any opinions expressed in the message above are Naperville, Illinois 60566 mine, and not necessarily AT&T's.