shell 相关

shell脚本执行错误 $'\r':command not found

存现这种错误是因为 编写的 shell脚本是在win下编写的,每行结尾是\r\n 的Unix 结果行是\n

所以在Linux下运行脚本 会任务\r 是一个字符,所以运行错误,需要把文件转换下:
dos2unix train.sh

train.sh

source activate env_name
CUDA_VISIBLE_DEVICES=0,1,2,3 nohup python train.py --batch-size=32 &
tail -f nohup.out

你可能感兴趣的:(shell 相关)