![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
xiaoxianerqq
这个作者很懒,什么都没留下…
展开
-
linux shell 逻辑运算符、逻辑表达式详解
原帖: http://www.cnblogs.com/chengmo/archive/2010/10/01/1839942.html shell的逻辑运算符 涉及有以下几种类型,因此只要适当选择,可以解决我们很多复杂的判断,达到事半功倍效果。 一、逻辑运算符 逻辑卷标 表示意思 1. 关于档转载 2015-05-07 14:29:37 · 284 阅读 · 0 评论 -
linux中shell变量$#,$@,$0,$1,$2的含义解释
原帖: http://blog.chinaunix.net/uid-25100840-id-271097.html 变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参数列表。如"$*"用「"」转载 2015-05-04 17:47:10 · 333 阅读 · 0 评论 -
shell编程——if语句 if -z -n -f -eq -ne -lt
原帖: http://www.dutycode.com/post-46.html shell编程中条件表达式的使用 if 条件 then Command else Command fi 别忘了这个结尾 If语句忘了结尾fi test.sh: line 1转载 2015-04-11 15:45:02 · 565 阅读 · 0 评论 -
[Linux] shell read命令 参数 -t -n -s记录
原帖: http://blog.csdn.net/misskissc/article/details/8154051 shell下的read命令的作用是从标准流中读取输入,并把读取的内容放到某个变量中。 用法:read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t转载 2015-05-18 14:24:56 · 1913 阅读 · 0 评论 -
linux bash shell中,单引号、 双引号,反引号(``)的区别及各种括号的区别
原帖: http://blog.csdn.net/miyatang/article/details/8077123 一、单引号和双引号 首先,单引号和双引号,都是为了解决中间有空格的问题。 因为空格在linux中时作为一个很典型的分隔符,比如string1=this is astring,这样执行就会报错。为了避免这个问题,因此就产生了单引号和双引号。他们的区别在于,转载 2015-05-18 14:37:20 · 344 阅读 · 0 评论 -
python调用shell脚本方法
转自 : http://www.cnblogs.com/djcsch2001/articles/2025944.html python调用Shell脚本,有两种方法:os.system(cmd)或os.popen(cmd),前者返回值是脚本的退出状态码,后者的返回值是脚本执行过程中的输出内容。实际使用时视需求情况而选择。 现假定有一个shell脚本 test.sh:转载 2016-08-05 11:54:07 · 603 阅读 · 0 评论 -
shell中各种括号的作用()、(())、[]、[[]]、{}
转自 : http://blog.csdn.net/taiyang1987912/article/details/39551385 一、小括号,圆括号() 1、单小括号 () ①命令组。括号中的命令将会新开一个子shell顺序执行,所以括号中的变量不能够被脚本余下的部分使用。括号中多个命令之间用分号隔开,最后一个命令可以没有分号,各命令和括号之间不必有空格。转载 2016-09-05 17:03:10 · 257 阅读 · 0 评论 -
一篇文章学懂Shell脚本
转自:https://www.toutiao.com/a6585088638055350792/?tt_from=mobile_qq&utm_campaign=client_share&timestamp=1533255047&app=news_article&utm_source=mobile_qq&iid=39055545733&utm_medi...转载 2018-08-05 09:26:40 · 204 阅读 · 0 评论