Basic Rule - The Backslash
The backslash (\) will take away the special meaning of the character that follows it.
Basic Rule - Back Quotes
Back quotes, also called "back tics", are used to execute an embedded (or nested) command and use the result returned by the embedded command in the outside or larger command. For example:
You can use the Back Quoting mechanism to set variables.
The $( ) Construct
In place of back quotes, the embedded command may be placed inside of single parenthesis, proceeded by a dollar sign. For example:
Basic Rules - Single Quotes
Single quotes ( ' ) can be used to group a number of words so that they are treated as a single argument.
Basic Rules - Double Quotes
Double quotes behave like single quotes EXCEPT the special meaning of the dollar sign ($), back quote (`) and backslash (\) are NOT suppressed.
Combining Single Quotes, Double Quotes and Backslash
Using single quotes, double quotes and the backslash is pretty straight forward. It becomes more complex as you combine them. Use the below activity to try out some combination examples. Follow the instructions within the slides to test your knowledge.