在linux中怎么执行自己亲手写的shell脚本

在linux中如何执行自己亲手写的shell脚本?一种方式:首先新建一个.sh文件编写test.sh shell脚本在Terminal

在linux中如何执行自己亲手写的shell脚本?
一种方式:

首先新建一个.sh文件

在linux中怎么执行自己亲手写的shell脚本


编写test.sh shell脚本

在linux中怎么执行自己亲手写的shell脚本


在Terminal终端中执行:

在linux中怎么执行自己亲手写的shell脚本




还有一种办法:

在linux中怎么执行自己亲手写的shell脚本

给指定的脚本文件授予足够的权限



直接在终端执行:

在linux中怎么执行自己亲手写的shell脚本

也行这样“

在linux中怎么执行自己亲手写的shell脚本