本帖最后由 lion991128 于 2016-10-22 18:45 编辑
- #!/bin/bash
-
- echo -n "Enter your name:"
-
-
- read name
-
-
- echo "hello $name,welcome to my program"
-
-
- exit 0
-
-
-
复制代码 我是新手 我想运行下效果 我保存为1.sh,用rz传到tmp文件夹下面,然后用./1.sh运行。
系统提示: 系统是centos 6.5 ,还请大家帮忙看看是我运行有问题吗?谢谢了
[root@leon tmp]# ./1.sh
-bash: ./1.sh: 权限不够
[root@leon tmp]# chmod +x ./1.sh
[root@leon tmp]# ./1.sh
-bash: ./1.sh: /bin/bash^M: bad interpreter: 没有那个文件或目录 |