Enter the following script to see how to avoid a variable substitution in these files:
- Save the script under the name here_no.sh, shown as follows:
filename="test1" cat <<'Quoted_End_Marker' When we add quotes before and after here Document marker, we can include variables Such as $USER, $PATH, $name and similar Quoted_End_Marker
- When you run this script, you will see output like the following:
$ bash here_no.sh
- Here is the output:
When we add quotes before and after here Document marker, we can include variables Such as $USER, $PATH, $name and similar
This script uses an ordinary here file, but it turns off the variable substitution. Otherwise, you would see the values of $HOME, $filename, and ...