sh脚本写法

1.shell注释符号:

1. 单行注释: “#”

2. 多行注释:

: << !

语句1

语句2

语句3

语句4

!

http://blog.csdn.net/lansesl2008/article/details/20558369/

2.sh的换行符号

mdl auto_test.py --once --det_mod /unsullied/sharefs/_research_detection/logs/megdet_shot/zhaojiacheng/retinanet/plate/plate.retinanet.xception145.data_v2/subnet64_89.5/test_model/ -det_n 35 
--bbr_mod /unsullied/sharefs/shiyuxuan/isilon-home/.cache/neupeak/train_log/shiyuxuan/car-models/bbregression/train_log/start_lbx.3c/models -bbr_n 60 
--rec_mod /unsullied/sharefs/zhangqinyi/zhudatu_data/plate/car-models/fpga-carplate-reco/config/noheat_NCPmergedata_rightlr/train_log/models -rec_n 40

符号用""表示换行,并且注意:""必须与前面的40、 60这些字符间隔一个空格,如果不间隔这个空格,就不能正常换行!!!!

3.串行运行几个程序

rlaunch --cpu=4 --gpu=1 --memory=16000 --positive-tags titanx -- sh det_time_test.sh
rlaunch --cpu=4 --gpu=1 --memory=16000 --positive-tags titanx -- sh bbr_time_test.sh
rlaunch --cpu=4 --gpu=1 --memory=16000 --positive-tags titanx -- sh reg_time_test.sh

这样写sh脚本,之后会先运行第一个sh,然后运行第二个

 4.shell的重定向是直接重写文件,要追加写文件,用>>

rlaunch --cpu=4 --gpu=1 --memory=16000 --positive-tags 1080ti -- sh det_time_test.sh >> log.txt
rlaunch --cpu=4 --gpu=1 --memory=16000 --positive-tags 1080ti -- sh bbr_time_test.sh >> log.txt
rlaunch --cpu=4 --gpu=1 --memory=16000 --positive-tags 1080ti -- sh reg_time_test.sh >> log.txt
原文地址:https://www.cnblogs.com/ymjyqsx/p/7906152.html