In this case, it is essential to put a backslash. Backslash will focus on character followed by a sign with a backslash. The following characters depose functions of the meta tag.
If you want to echo single quotes, you can to:
echo Single quote: \'
Output: Single quote: '
If you want to to echo double quote, you can do:
echo Double quote: \"
Output: Double quote: "
If you want to quote single quote in double quotes:
echo "Single quote in double quotes: '"
Output: Single quote in double quotes: '
If you want to quotes double quotes in double quotes:
echo "Double quote in double quotes \""
Output: Double quote in double quotes "
There is 2 kinds of quoting: weak (") and strong ('). Using weak quoting there is no special meanings of:
echo "Path to your shell is: $SHELL" echo 'Path to your shell is: $SHELL'
Output: Path to your shell is: /bin/bash
Path to your shell is: $SHELL
We prepared for you video course Marian's BASH Video Training: Mastering Unix Shell, if you would like to get much more information.
Thank you. Marian Knezek