linux shell IF判断时报not found错误解决方法
来源:互联网 发布:steam mac版有什么游戏 编辑:程序博客网 时间:2024/06/07 23:51
最近一个项目需要写一个linux shell脚本,在linux指定目录下遍历*.sql文件,如果有的话,执行文件(文件里面是一个update语句),在遍历文件夹时总是报一个[sql: not found的错误,差点崩溃了,后来才知道原因,特意给大家分享下,希望其他人少走弯路
原来if判断那块有个坑,if空格[空格$? -eq 0空格]; if后面加空格,条件两边也得加空格,以下是数字比较和字符串比较例子
---------number
if [ 1 -eq 2 ];then
fi
--------string
if [ 'a' = 'v' ];then
fi
希望能帮到其他人!:)
0 0
- linux shell IF判断时报not found错误解决方法
- Linux:shell-if判断
- ubuntu 14.04环境下执行adb shell 时报错 error: device not found.的解决方法
- linux环境变量 shell变量 command not found解决方法
- shell if[-d command not found
- Linux shell脚本执行提示错误[[: not found
- image not found 错误解决方法
- Linux下的 command not found错误(解决方法)
- Linux shell if条件判断
- Linux Shell if条件判断
- Linux shell中的if判断
- Linux php not found 解决方法
- 当eclipse导入工程时报"The builder launch configuration could not be found"错误时的解决方法
- shell脚步错误“command not found 2:”
- Mybatis junit测试时报: parameter *** not found.available 错误处理
- 解决scp时报bash: scp: command not found的错误
- HTTP 错误 404.17 - Not Found 解决方法
- Reason: image not found 错误解决方法
- 文件夹拷贝 子文件及文件夹
- SDUT_2015寒假集训_结构体练习_F-商人的诀窍
- php 防止sql注入的方法和步骤
- Windows操作系统万能Ghost全攻略
- ======IntentService======
- linux shell IF判断时报not found错误解决方法
- 汽车标志集锦
- PKI系统深入介绍
- Android 通知栏Notification的整合 全面学习 (一个DEMO让你完全了解它)
- 按下两次返回键退出应用
- jquery blur 事件
- 在集群上安装 hadoop2.5.2
- Arcengine9.3 开发环境搭建
- RabbitMQ能打开的最大连接数