【脚本片段】cat中防止变量替换
#!/bin/bash
VARIABLE_NAME="HelloWorld"
cat <<'EOF'
The variable $VARIABLE_NAME should not be replaced.
EOF
cat <<EOF
In this case, we'll escape the dollar sign: \$VARIABLE_NAME
EOF
--- 她说, 她是仙,她不是神
#!/bin/bash
VARIABLE_NAME="HelloWorld"
cat <<'EOF'
The variable $VARIABLE_NAME should not be replaced.
EOF
cat <<EOF
In this case, we'll escape the dollar sign: \$VARIABLE_NAME
EOF