shell 命令 not found
来源:互联网 发布:ios 软件推荐 编辑:程序博客网 时间:2024/05/21 18:30
先说下我的情况,SHELL脚本如下:
#!/bin/bash i=1; for file in `ls`;do A[$i]=$file; ((i++)) done;
使用 sh a.sh出现错误
a.sh: 4: a.sh: A[1]=1: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=a1.txt: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=a2.txt: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=a.sh: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=a.txt: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=b.sh: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=err.txt: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=in.txt: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=m.txt: not found
a.sh: 5: a.sh: i++: not found
a.sh: 4: a.sh: A[1]=rabbitmq: not found
a.sh: 5: a.sh: i++: not found
不一定是你的脚本除了问题,可能使用的bash命令是有问题的,
查看 ll /bin/sh
lrwxrwxrwx 1 root root 4 Nov 3 06:37 /bin/sh -> dash
用的是dash,解决方式,脚本头部已经有了 #!/bin/bash
接下来赋予其可执行权限即可
./a.sh 成功
- shell 命令 not found
- Shell: let:not found
- shell select: not found
- shell find: command not found
- Android开发中使用adb shell命令出现sqlite3 : not found 问题
- Android开发中使用adb shell命令出现sqlite3 : not found 问题
- Android 使用adb shell命令时出现sqlite3 : not found 问题 解决方法
- Android开发中使用adb shell命令出现sqlite3 : not found 问题
- Android开发中使用adb shell命令出现sqlite3 : not found 问题
- Android 使用adb shell命令时出现sqlite3 : not found 问题 解决方法
- 关于adb shell命令后报错error:device not found的一种解决方案
- jenkins执行shell命令,有时会提示“Command not found”----处理方案
- ADB卸载所有安装包shell命令出现command not found: ^M
- adb shell命令输入dos窗口后,报错error:device not found
- 执行shell脚本中declare: not found
- adb shell sqlite3 not found problem solved
- shell脚步错误“command not found 2:”
- >adb shell 提示:error:device not found
- 实验七 数据缓存写入SD卡
- Java-IO-输入/输出流体系
- [js点滴]JavaScript瀑布流实现技巧
- 学51单片机中的几个小程序
- 关于jsp和html文件的缓存问题
- shell 命令 not found
- shell学习笔记(四)
- Spring Boot + Mybatis + Ehcache架构基本配置
- PHP 安装imagick扩展
- 11月9日 星期三
- 用mac自代的git命令使用笔记
- Notepad++ 的使用(插件)
- Qt修炼手册2_动态设计
- 最长上升子序列(代码实现)