- 1
- 0
- 约1.12万字
- 约 55页
- 2017-07-23 发布于湖北
- 举报
Linux系统基本操作概要1
武汉恒亿电子科技发展有限公司 Wuhan HiEasy Electronic Technology Development Co., Ltd. 有时候变量名很容易与其他文字混淆,比如: num=2 echo this is the $numnd 这并不会打印出this is the 2nd,而仅仅打印 this is the ,因为shell会去搜索变量numnd的值, 但是这个变量时没有值的。可以使用花括号来告 诉shell我们要打印的是num变量: num=2 echo this is the ${num}nd 这将打印: this is the 2nd Summary: Shell编程几个注意的问题 武汉恒亿电子科技发展有限公司 Wuhan HiEasy Electronic Technology Development Co., Ltd. 通常用 [ ] 来表示条件测试。注意这里的空格很 重要。要确保方括号的空格。 #!/bin/sh if [ $SHELL = /bin/bash” ]; then echo your login shell is the bash (bourne again shell) else echo your login shell is not bash but $SHELL fi Summary: Shell编程几个注意的问题 武汉恒
原创力文档

文档评论(0)