我sbatch
用来运行脚本,我希望输出文本从某个点写入文件,即我想回显一些文本以便用户可以看到,但是在某个命令之后我希望所有输出都写入一份文件。有没有办法做到这一点?如果没有,我怎样才能完全禁用输出日志记录?
编辑:示例:
#!/bin/bash
#SBATCH --partition analysis
#SBATCH --nodes 1
#SBATCH --ntasks-per-node 1
#SBATCH --exclusive
#SBATCH --time 14-0
#SBATCH -c1
#SBATCH --mem=400M
#SBATCH --job-name jupyter
module load jupyter
## get tunneling info
XDG_RUNTIME_DIR=""
ipnip=$(hostname -i)
echo "
Copy/Paste this in your local terminal to ssh tunnel with remote
-----------------------------------------------------------------
ssh -N -L 7905:$ipnip:7905 USER@HOST
-----------------------------------------------------------------
"
##UP UNTIL HERE ECHO TO TERMINAL
##FROM NOW ON, ECHO TO A FILE
## start an ipcluster instance and launch jupyter server
jupyter-notebook --no-browser --port=7905 --ip=$ipnip