开头:

#!/bin/sh

符号#!用来告诉系统它后面的参数是用来执行该文件的程序。

注释:

以#开头的句子表示注释,直到这一行的结束 。

变量

例子:

#!/bin/sh
#对变量赋值
num=2
echo "this is the ${num}nd"

输出:this is the 2nd

环境变量:

export:

results matching ""

    No results matching ""