
shell
我等你永远为期
这个作者很懒,什么都没留下…
展开
-
shell 脚本if 逻辑判断判断
grep -q (安静模式,不打印任何标准输出。如果有匹配的内容则立即返回状态值0。)1、字符串判断str1 = str2 当两个串有相同内容、长度时为真 str1 != str2 当串str1和str2不等时为真 -n str1 当串的长度大于0时为真(串非空) -z str1 当串的长度为0时为真(空串) str1转载 2015-06-02 15:28:40 · 701 阅读 · 0 评论 -
shell 脚本变量赋值
在Linux/Unix中,一般在屏幕上面看到的信息是从stdout (standard output) 或者 stderr (standard error output) 来的,通常在 server 的工作环境下,几乎所有的程序都是 run 在 background 的,所以为了方便 debug,一般在设计程序时,就把 stdout 送到/存到一个档案,把错误的信息 stderr 存到不同的档转载 2015-06-02 11:31:02 · 535 阅读 · 0 评论