Operating System - HP-UX
1848514 Members
7606 Online
104030 Solutions
New Discussion

Re: Special Characters in a script

 
MikeL_4
Super Advisor

Special Characters in a script

Is there any way to change the meaning of a special character within a script, for that script only ???
i.e S{variable} where you could use another character rather than the $ sign
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: Special Characters in a script

No, but I've never found that to be necessary. Typically, you can use the backslash to escape the character's special meaning.

e.g. suppose that MYVAR=Clay

echo "$MYMAR"
Clay

echo "\$MYVAR"
$MYVAR

If it ain't broke, I can fix that.