Thursday, March 01, 2007

Protect the Literal Meaning of Special Characters

If you want to preserve the literal meaning of a special character, you will need to use an escape character. Here's an example of its use.

#echo "For My SysAd Blog, the post value of \$number is $number."
For My SysAd Blog, the post value of \$number is 126.

#echo "For \"My SysAd Blog,\" the post value of \$number is $number."
For "My SysAd Blog," the post value of \$number is 126.

No comments: