From the course: Linux: Shells and Processes

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Escape characters and quotes

Escape characters and quotes - Linux Tutorial

From the course: Linux: Shells and Processes

Escape characters and quotes

- [Instructor] As with most programming languages, Bash treats certain characters differently. For instance, when you want to reference a variable, you need to prefix the variable name with a dollar sign to let Bash know to look up the variable with that name as opposed to treating the text literally. These special characters are called metacharacters and have special meanings. These metacharacters include the lesser than and greater than symbols, carrot, dollar sign, period, asterisk, question mark, square brackets, curly braces, parentheses, pipe, plus, back slash, forward slash, single quotes, double quotes, and back ticks. Sometimes you don't want the shell to interpret these metacharacters as being special. For instance, if I want to display a variable name on screen, including the dollar sign, I will need to escape the metacharacter so it doesn't get processed by the shell. For this, we will use the backslash and…

Contents