shell 如何启动一个shell脚本
时间: 2023-07-05 17:28:59 浏览: 96
要启动一个Shell脚本,需要在终端中输入以下命令:
```bash
sh /path/to/your/script.sh
```
其中,`/path/to/your/script.sh` 是你的Shell脚本的路径。如果脚本没有执行权限,需要使用 chmod 命令添加执行权限,例如:
```bash
chmod +x /path/to/your/script.sh
```
然后再执行脚本:
```bash
./path/to/your/script.sh
```
其中,`./` 表示当前目录,用于执行具有执行权限的Shell脚本。
阅读全文
相关推荐













