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./test_model/ -det_n \
- --bbr_mod /unsullied/sharefs/shiyuxuan/isilon-home/.cache/neupeak/train_log/shiyuxuan/car-models/bbregression/train_log/start_lbx.3c/models -bbr_n \
- --rec_mod /unsullied/sharefs/zhangqinyi/zhudatu_data/plate/car-models/fpga-carplate-reco/config/noheat_NCPmergedata_rightlr/train_log/models -rec_n
符号用"\"表示换行,并且注意:"\"必须与前面的40、 60这些字符间隔一个空格,如果不间隔这个空格,就不能正常换行!!!!
3.串行运行几个程序
- rlaunch --cpu= --gpu= --memory= --positive-tags titanx -- sh det_time_test.sh
- rlaunch --cpu= --gpu= --memory= --positive-tags titanx -- sh bbr_time_test.sh
- rlaunch --cpu= --gpu= --memory= --positive-tags titanx -- sh reg_time_test.sh
这样写sh脚本,之后会先运行第一个sh,然后运行第二个
4.shell的重定向是直接重写文件,要追加写文件,用>>
- rlaunch --cpu= --gpu= --memory= --positive-tags 1080ti -- sh det_time_test.sh >> log.txt
- rlaunch --cpu= --gpu= --memory= --positive-tags 1080ti -- sh bbr_time_test.sh >> log.txt
- rlaunch --cpu= --gpu= --memory= --positive-tags 1080ti -- sh reg_time_test.sh >> log.txt
sh脚本写法的更多相关文章
- .sh脚本判断判断某一变量是否为某一数值
.sh脚本中,判断某一变量(例如:OEM_CUSTOMER_SUPPORT)是否为某一数值(例如:0),并根据条件做不同处理,写法如下: if [ $OEM_CUSTOMER_SUPPORT -eq ...
- sh脚本异常:/bin/sh^M:bad interpreter: No such file or directory
在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory. 分析:这是不同系统编码格式引起的:在windows系统中 ...
- linux执行sh脚本文件命令
linux执行sh脚本文件命令 很多时候需要多个命令来完成一项工作,而这个工作又常常是重复的,这个时候我们自然会想到将这些命令写成sh脚本,下次执行下这个脚本一切就都搞定了,下面就是发布代码的一个脚本 ...
- sh脚本学习之: sh脚本 、sed、awk
sh脚本 sh命令的批处理文件,支持更复杂的逻辑. Shell中的变量 参数 $0 当前脚本路径 $1....$n 脚本执行对应的第n个参数 条件判断 文件判断 test [op] path e存在 ...
- 安装GRID时跑root.sh脚本报错(ORA-27091: unable to queue I/O)
在安装GRID过程中,运行root.sh脚本时报如下信息: Adding Clusterware entries to upstart CRS-2672: Attempting to start 'o ...
- sh脚本异常:bad interpreter: No such file or directory
转:http://bluedest.iteye.com/blog/1674963 在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file o ...
- ubuntu sh脚本双击运行
自从13.04以后,双击sh脚本文件就已经默认是geidt打开了,要想运行,从nautilus-->文件-->首选项-->行为-->可执行文件 有三个选项,默认是第二个,如果想 ...
- sh脚本执行Java程序
1.不引用Jar包或者资源文件夹 最简单的程序Hello World. 首先创建Hello.java public class Hello { public static void main(Stri ...
- linux服务器监控流量sh脚本
服务器可能经常遇到服务器出带宽跑满,不知如何查询被哪个进程占用的情况,有一款开源的英文软件iftop功能比较强大可以查询相关信息,可能刚接触linux系统的朋友不太会使用,在此写了一个功能比较简单无需 ...
随机推荐
- writing-mode属性
writing-mode属性 最初只是ie中的属性,只有ie支持,现在在css3中谷歌,火狐也开始支持. 所以使用的时候就需要记住两套不同的语法,ie的私有属性和css3的规范属性 如果只需要兼容到i ...
- C - Soldier and Cards
Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description Two bo ...
- NYOJ5——Binary String Matching
Binary String Matching 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述:Given two strings A and B, whose alph ...
- Codeforces404C【构造】
题意: 一个图有n个点,每一个点最多连接k条直线,给出多有起点到终点的距离,没有环,不能输出重边,输出所有有连接的单向边 思路: 就是简单想-不知道怎么说了,画个图,我们建边,那么距离是 i 就是连距 ...
- <TLE>奇偶剪枝hdoj1010
(奇偶剪枝)转自百度百科,讲的非常棒: http://baike.baidu.com/link?url=3g5bW7LszRVOVvFDFp6cL0ZZnAaOLUdpaNjc2leHoxkKU9Eh ...
- Unity脚本打包android工程
using UnityEngine; using System.Collections; using UnityEditor; public class NewBehaviourScript : Ed ...
- 洛谷P4867 Gty的二逼妹子序列(莫队+树状数组)
传送门 本来打算用主席树 然后发现没办法维护颜色数 于是用了莫队加树状数组 然后竟然A了…… //minamoto #include<iostream> #include<cstdi ...
- class JsonItemExporter(BaseItemExporter):
class JsonItemExporter(BaseItemExporter):这个类的实现和几年前的实现有了点小变化,主要就是是否添加换行
- Spring事务引发dubbo服务注册问题
文章清单 1. 问题 2. 查找bug过程 3. 解决方案 使用spring boot+dubbo写项目,一个服务,之前是正常的,后来调用方出现空指针异常,第一反应提供方出了问题. 1. 看控制台,服 ...
- HDU6447(离散化扫描线+树状数组)
一眼看过去就x排序扫描一下,y是1e9的离散化一下,每层用树状数组维护一下,然后像dp倒着循环似的树状数组就用y倒着插就可行了. 类似题目练习:BZOJ4653.BZOJ1218 #pragma co ...