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系统的朋友不太会使用,在此写了一个功能比较简单无需 ...
随机推荐
- Table View Programming Guide for iOS---(二)----Table View Styles and Accessory Views
Table View Styles and Accessory Views 表格视图的风格以及辅助视图 Table views come in distinctive styles that are ...
- django上课笔记1-目录介绍-路由系统-ORM操作
一.Django目录介绍 django-admin startproject mysite # 创建名为mysite的项目 cd mysite # 切换到该目录下 python manage.py s ...
- hdoj1789【贪心】
题意: 已知有n个作业,每个作业呢,都是一天可以做完,每个作业都有一个截止日期,每个作业如果超过他的截止日期会扣分,最后让你求一个怎么安排求得一个最小扣的分数. 比如现在有3个作业 截止日期:3 3 ...
- Codeforces Round #324 (Div. 2)C. Marina and Vasya
A的万般无奈...后来跑了大牛的这份代码发现, 题意是求一个序列与给定的两个序列有t个不同. 只要保证...对应位置就行了.. 所以处理起来非常方便.............. 可是没有感觉是对应位置 ...
- bzoj 4010: [HNOI2015]菜肴制作【拓扑排序】
也就是给定有向图,求最小字典序的拓扑序,直接用小根堆就行(或者反着建图用大根堆) #include<iostream> #include<cstdio> #include< ...
- Mac 开发 Hue
1)环境准备 Maven 3.6.1 python (Anaconda 2.7.16) MySQL 5.7 git 2.21 2)Hue源码下载 git clone git@github.com:ar ...
- windows 异步通知I/O模型与重叠I/O模型
一.异步IO模型(asynchronous IO) (1)什么是异步I/O 异步I/O(asynchronous I/O)由POSIX规范定义.演变成当前POSIX规范的各种早起标准所定义的实时函数中 ...
- 用jQuery获取到一个类名获取到的是一个数组 ,如果对数组中的每个进行相应的操作可以这样进行
$(".userImg").each(function(){ $(this).click(function(){ var imgid = $(this).attr("id ...
- Codeforces Round #544 (Div. 3) A.Middle of the Contest
链接:https://codeforces.com/contest/1133/problem/A 题意: 给两个时间点,求中间时间点. 思路: 数学 代码: #include <bits/std ...
- stack(单调栈) POJ 2082 Terrible Sets
题目传送门 题意:紧贴x轴有一些挨着的矩形,给出每个矩形的长宽,问能组成的最大矩形面积为多少 分析:用堆栈来维护高度递增的矩形,遇到高度小的,弹出顶部矩形直到符合递增,顺便计算矩形面积,且将弹出的宽度 ...