shell
文章平均质量分 64
shexinwei
这个作者很懒,什么都没留下…
展开
-
How Does Shell Script Looping Work?(shell程序设计中的循环)
Shell scripts written in Bash can implementlooping, or iteration, with thewhile,until, andforconstructs. In each case, a block of code is ex原创 2011-09-04 12:04:06 · 557 阅读 · 0 评论 -
shell中单引号、双引号、反引号的简单使用
#!/bin/sh echo "This is echo command" #This is a comment line #This is a definition of a var comment="This is comment" #This is usage of a var echo $comment #单引号中的$将不会被当作变量计算,双引号中的$将会当作变量计算。 var=原创 2011-10-25 11:28:26 · 601 阅读 · 0 评论 -
shell中的test测试命令
1)判断表达式 test 表达式1 –a 表达式2 两个表达式都为真 test 表达式1 –o 表达式2 两个表达式有一个为真 2)判断字符串 –n s1 字符串s1的长度非零,表达式为真 –z s1 如果字符串s1的长度为零,表达式为真 s1= s2原创 2011-11-01 16:42:15 · 927 阅读 · 0 评论 -
linux中设置shell输出样式
echo -e "\033[32;49;1m [DONE] \033[39;49;0m" 输出结果 :[DONE] ########################### 文本终端的颜色可以使用“ANSI非常规字符序列”来生成。举例: echo -e "\033[44;37;5m ME \033[0m COOL" 以上命令设置背景成为蓝色,前景白色,闪烁光标,输出字符“M转载 2012-05-12 10:08:21 · 602 阅读 · 0 评论 -
shell练习源码
源码1:shell基础(单引号,双引号,反引号) #!/bin/sh echo "This is echo command" #This is a comment line #This is a definition of a var comment="This is comment" #This is usage of a var echo $comment #单引号中的$将不会被原创 2012-06-08 09:33:50 · 1474 阅读 · 0 评论