【脚本片段】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
posted @ 2024-07-23 10:33  bregman  阅读(26)  评论(0)    收藏  举报