Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!dfoster From: dfoster@jarthur.Claremont.EDU (Derek R. Foster) Newsgroups: comp.unix.shell Subject: Re: how to echo the ' Keywords: metachar, escape char Message-ID: <11313@jarthur.Claremont.EDU> Date: 20 Mar 91 04:56:17 GMT References: <3841@gmuvax2.gmu.edu> Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 31 Someone whose name seems to have gotten lost wrote: > OK, in csh, I want to have this string echo'd... ^[=@'^[H8 > Problem being, I can't get the ' to be echo'd. > (I am putting this command into a shell script.) > If I use the command... > > echo '=@'H8' > > ...it thinks the string to be echo'd ends at the second ' > If I use the command... > echo '=@\'H8' > > ...it sees the \ as a character > To echo a string like abc'def use the format echo 'abc'\''def' This is read as: a string, 'abc' an escaped quote character, \' which will not be interpreted like a normal quote character by the shell, another string, 'def' In your case, this becomes: echo '=@'\''H8' I hope this helps! Derek Riippa Foster