一、脚本执行方式

1.先赋予权限

chmod +x test.sh;

 再直接执行

./test.sh

 2、调用解释器使得脚本执行

3、使用source命令

source test.sh

 

 

二、编写基础

1、开头用#!指定脚本解释器

#!/bin/sh

 

 

2、编写具体内容

 

相关文章: