我正在尝试在新bash
会话中执行一组命令:
exec bash <<- EOF
ln -snf $JDK_REPO'/jdk'$1 $CURRENT;
JAVA_HOME=$(readlink -f $CURRENT);
echo $JAVA_HOME;
export PATH= $JAVA_HOME/bin:$PATH;
exec usejdk
EOF
我收到此错误:
warning: here-document at line 46 delimited by end-of-file (wanted `EOF')
我试图用whatswrongwithmyscript调试它,我得到:
Use <<- instead of << if you want to indent the end token.
有什么建议在新 bash
实例中执行一组命令吗?