[EnglishFrontPage] [TitleIndex] [WordIndex

1. Backslash Symbol

In the shell, the backslash symbol serves the following purposes:

1.1. Suppression of Interpolation

The backslash symbol is be used to prevent [interpolation] of [metacharacters] by the shell. By prefixing the dollar [symbol] with a backslash [metacharacter], we prevent interpolation from taking place:

 echo "Cost is $price dollars"   # Without the backslash $price is output as 300
 echo "Cost is \$price dollars"  # Interpolation of $price does not take place

2012-07-01 04:05