shell 编程 错误 bash: [: missing `]'
来源:互联网 发布:单片机led灯循环点亮 编辑:程序博客网 时间:2024/06/06 09:47
问题的解决
正如上面所说,前两次运行都没有问题,那么细细分析代码,发现,程序执行到这里:
if [ "$HEADER" = "true"] ;then
出现了问题 ,这是因为 在 [ ] 内 要有空格 ,也就是说 "$HEADER" 前 和 "true" 后要有空格才行。
所以必须改为
if [ "$HEADER" = "true" ] ;then
这样就解决了 bash: [: missing `]'
转载自http://blog.csdn.net/longxibendi/article/details/5886396
0 0
- shell 编程 错误 bash: [: missing `]'
- shell 编程 错误 bash: [: missing `]'
- 解决 shell 编程 错误 bash: [: missing `]'
- shell 编程 错误 [: missing ]
- Bash学习之“missing ' ”错误
- Shell错误[: missing `]'
- Bash shell常见错误
- Bash Shell编程
- BASH SHELL编程:
- Bash Shell编程
- bash shell的编程
- Linux下Bash Shell编程
- shell编程bash引号规则
- Shell/Bash 时间编程技巧
- Shell编程(bash变量)
- SHELL编程BASH环境变量-57
- bash shell 编程练习一
- bash shell 编程练习二
- 带你玩转Visual Studio——带你新建一个工程
- CUDA(一)—基础知识
- linux usb ehci controller driver
- 自定义SDWebImage图片缓冲区自清理机制
- Gif录制工具--Mac篇
- shell 编程 错误 bash: [: missing `]'
- Servlet中解决中文乱码的方法
- box-shadow 制作单边阴影效果,不影响其它边的效果
- 【2016 泉市教科】保险箱
- studio 导入eclipse步骤及一些问题的解决
- 【Unity】Kinect入门——项目搭建
- 关于编程语言的思考——编译型和解释型
- 递归实现二叉树的三种遍历
- vsftpd的配置dns反向解析问题