1.创建shell脚本

vi hello.sh

2.编写

shell学习 入门教程1

3.执行

1.作为可执行程序执行

chmod +x ./hello.sh          #使脚本具有执行权限

./hello.sh         #执行脚本

2.作为解释器参数执行

/bin/sh hello.sh

输出结果:

shell学习 入门教程1


相关文章:

  • 2021-11-28
  • 2022-01-15
  • 2022-02-22
  • 2022-12-23
  • 2022-01-31
  • 2021-07-13
  • 2022-01-26
  • 2022-12-23
猜你喜欢
  • 2021-09-26
  • 2021-04-23
  • 2021-12-24
  • 2022-01-22
  • 2022-02-11
  • 2021-03-31
  • 2021-11-15
相关资源
相似解决方案