The blank in SHELL
2017-01-09 08:45
169 查看
本文主要说明防止在shell脚本中,用于检测文件是否存在出现问题时,空格符号的问题。
A="~/home/lafile/xxx.sh"
不应该写成:
A = "~/home/lafile/xxx.sh"
否则在(if, while, until)test 过程中无法检测到实际上是否存在这个文件。
在shell脚本中:定义变量不要加空格!
如:A="~/home/lafile/xxx.sh"
不应该写成:
A = "~/home/lafile/xxx.sh"
否则在(if, while, until)test 过程中无法检测到实际上是否存在这个文件。
相关文章推荐
- Ghost in the Shell 2: Innocence
- The Interrupt handling in Korn shell and C Shell
- MongoDB - The mongo Shell, Data Types in the mongo Shell
- 如何解决npm should be run outside of the node repl,in your normal shell
- 攻壳机动队 Ghost in the Shell
- awk:the most powerful utility tool in shell world.
- 解决spark运行中ERROR Shell:Failed to locate the winutils binary in the hadoop binary path的问题
- Ex2010-19 How to Run the Exchange Management Shell EMS in PowerShell
- Create and Use a Custom Formatter in the Apache HBase Shell
- How to copy and paste quickly in the shell
- Cocoa in the Shell
- shell iterate the directory in recursive way
- HowTo: Run the .sh File Shell Script In Linux / UNIX
- spark: ERROR Shell: Failed to locate the winutils binary in the hadoop binary path
- 出现 ERROR org.apache.hadoop.util.Shell - Failed to locate the winutils binary in the hadoop binary pa
- [html] open the link in a new page without target="_blank" (Required by w3c strict)
- Modify and set the default shell in Solaris10
- npm should be run outside of the node repl, in your normal shell
- npm should be run outside of the node repl, in your normal shell
- 14.Iterate a Cursor in the mongo Shell-官方文档摘录