天天看點

回顧一下shell腳本1

首先:

1、編寫一個hello.sh的程式

hello.sh

vim hello.sh

編寫完成,接下來我們還需要對她賦予權限

chmod a+x hello.sh

然後./hello.sh

即可在終端看到結果:hello shell

2、在shell腳本中使用read指令

同樣的,chmod a+x hello.sh

然後運作: ./hello.sh

3、定義變量