执行shell文件
执行shell文件
1.建立 .sh 文件
touch hello.sh
2.进入 hello.sh 文件
vi hello.sh
3.书写表头,与内容
#!/bin/bash
aa="hallo"
4.保存退出
Esc --> : --> wq --> enter
5 .赋予执行权
chmod +x hello.sh
6.执行 hello.sh 文件
. ./hello.sh
7.打印变量
echo $aa

*****其他linux命令
pstree 查看内核进程

执行shell文件
1.建立 .sh 文件
touch hello.sh
2.进入 hello.sh 文件
vi hello.sh
3.书写表头,与内容
#!/bin/bash
aa="hallo"
4.保存退出
Esc --> : --> wq --> enter
5 .赋予执行权
chmod +x hello.sh
6.执行 hello.sh 文件
. ./hello.sh
7.打印变量
echo $aa

*****其他linux命令
pstree 查看内核进程
