http://linux.vbird.org/linux_basic/0340bashshell-scripts.php
mkdir scripts建立一個目錄叫scripts
cd scripts打開…
進入vi後要下指令a開始輸入模式
:wq 存檔
[root@www ~]# mkdir scripts; cd scripts [root@www scripts]# vi sh01.sh #!/bin/bash # Program: # This program shows "Hello World!" in your screen. # History: # 2005/08/23 VBird First release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo -e "Hello World! \a \n" exit 0
[root@www scripts]# sh sh01.sh
Hello World !
沒有留言:
張貼留言