how to echo the '
Xiang-Min Wang
xwang at gmuvax2.gmu.edu
Wed Mar 20 12:04:55 AEST 1991
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 at 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
More information about the Comp.unix.shell
mailing list