[linux] Linux下面如何运行.sh文件

【步骤一】cd到.sh文件所在目录
【步骤二】给.sh文件添加x执行权限
比如以hello.sh文件为例,chmod u+x hello.sh or chmod a+x hello.sh
【步骤三】./执行.sh文件
[linux] Linux下面如何运行.sh文件
【步骤四】sh 执行.sh文件
以hello.sh文件为例,sh hello.sh即可执行hello.sh文件,如下图
[linux] Linux下面如何运行.sh文件

上一篇:修改linux文件权限


下一篇:Linux学习笔记8