执行shell文件

执行shell文件linux

 

1.创建    .sh   文件shell

touch hello.shbash

2.进入 hello.sh 文件blog

vi  hello.sh进程

3.书写表头,与内容变量

#!/bin/bashim

aa="hallo"touch

 

4.保存退出img

Esc     -->      :      -->  wq   --> enter文件

5 .赋予执行权

chmod  +x  hello.sh

6.执行 hello.sh 文件

. ./hello.sh

7.打印变量

echo $aa

 

*****其余linux命令

pstree  查看内核进程

相关文章
相关标签/搜索