教程网站:

C语言中文网 http://c.biancheng.net/view/706.html

菜鸟教程 https://www.runoob.com/linux/linux-shell.html

简单示例

#!/bin/bash
echo "Hello World !"

echo命令用于向窗口输出文本

 

运行 Shell 脚本有两种方法

1、作为可执行程序

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

2、作为解释器参数

这种运行方式是,直接运行解释器,其参数就是 shell 脚本的文件名,如:

/bin/sh test.sh
/bin/php test.php

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-01-08
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-02
  • 2021-11-29
  • 2021-11-28
  • 2021-07-11
  • 2021-11-13
  • 2021-05-18
  • 2021-07-07
相关资源
相似解决方案