有没有办法阻止envsubst替换$VARIABLE?例如,我会期待像:
export THIS=THAT echo "dont substitute \\\$THIS" | envsubst
并让它返回
dont substitute $THIS
而是我得到
dont substitute \THAT
有这样做的逃脱角色吗?
export DOLLAR='$' export THIS=THAT echo '${DOLLAR}THIS' | envsubst
或更清楚:
export THIS=THAT echo '${DOLLAR}THIS' | DOLLAR='$' envsubst