attention and debug
来源:互联网 发布:印度与中国 知乎 编辑:程序博客网 时间:2024/06/06 19:10
sh -x scriptname print the command execute result
sh -n scriptname no run the script and check the script programmer error
sh -v scriptname 在实际执行一个命令前打印出这个命令.
set -o verbose
# 执行前打印命令.
shell 注意事项
var=newvar
等号赋值,左右两边不可以有空格
Test和[]中可用的比较运算符只有==和!=,两者都是用于字符串比较的,不可用于整数比较,整数比较只能使用-eq,-gt这种形式。
a. if 与 [ 之间缺少空格
b.[ ] 之间的参数之间缺少空格
c.[与后面的参数之间缺少空格
sh -n scriptname no run the script and check the script programmer error
sh -v scriptname 在实际执行一个命令前打印出这个命令.
set -o verbose
# 执行前打印命令.
shell 注意事项
var=newvar
等号赋值,左右两边不可以有空格
Test和[]中可用的比较运算符只有==和!=,两者都是用于字符串比较的,不可用于整数比较,整数比较只能使用-eq,-gt这种形式。
a. if 与 [ 之间缺少空格
b.[ ] 之间的参数之间缺少空格
c.[与后面的参数之间缺少空格
正确的方式 if ["$HOME" = "/home/igi" ]
单引号与双引号的最大不同在于双引号仍然可以保有变量的内容,但单引号内仅能是一般字符,而不会有特殊符号.
-> echo "$(date)"
Thu Aug 24 16:41:08 CST 2017
case 分支结束的双分号
case $1 in
green)
echo -en "\033[32m$2\033[0m";;
阅读全文
0 0
- attention and debug
- undo tablespace switch and attention
- attention
- Attention
- Attention
- attention
- Attention
- Attention
- Attention
- Attention
- Attention
- Attention And Consideration For Abercrombie & Fitch Jeans
- Attention and Augmented Recurrent Neural Networks
- attention when you debug bootstrap's form layout
- Now Launching Native Debug Session Attention! No symbol directories found
- Attention And Memory in Deep Learning And NLP
- [深度学习论文笔记][Attention]Show, Attend, and Tell: Neural Image Caption Generation with Visual Attention
- 《The Frontiers of Memory and Attention in Deep Learning》 图文结合详解深度学习Memory & Attention
- poj-2182-Lost Cows (树状数组,线段树)
- 《leetcode》best-time-to-buy-and-sell-stock-i-ii-iii
- C/C++中的关键字
- 递归的函数
- JAVA中MAP的四种类型区别和常见的简单用法
- attention and debug
- klass实现js的类的方式
- 翻转链表
- jQuery学习笔记2
- HDU-5155 Harry And Magic Box(DP,组合数)
- 简单的多线程编程_同步与互斥问题
- lightoj 1028
- python中的pop函数和append函数
- 用VirtualBox建立一个ubuntu机群