Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!emory!gatech!purdue!haven!umbc3!gmuvax2!xwang From: xwang@gmuvax2.gmu.edu (Xiang-Min Wang) Newsgroups: comp.unix.shell Subject: how to echo the ' Keywords: metachar, escape char Message-ID: <3841@gmuvax2.gmu.edu> Date: 20 Mar 91 02:04:55 GMT Organization: George Mason Univ., Fairfax, Va. Lines: 39 I saw the following msg sometimes before: 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, thus moving the the wrong cursor position (this is a terminal plotting command). /vv\ \ __Insight from Oregon...Scott P. Nichols _____/ \ ~~~~~~~~~~~~~~~~ (nichols@en.ecn.purdue.edu) Could you try: echo =@\'H8 I am sure this command gives the string =@'H8 echoed (but I am not sure that is you want). the single quote ' and the backslash \ are the csh metacharacters. their functions are escaping the other csh metacharacters. a character immediately following the backslash \ is not interpreted by csh (so that ' is echoed in my example). characters between two single quotes are not interpreted by csh either (so the \ seen as a character in your example). BTW, on my machine (ultrix 4.x), the ' has to be matched. good luck. xwang