oӰDi쪺ܤFAڬnDz scripts OHnǥiiHrIHIpGzuQny|z Linux NnܡAo@ӳTiHLhݤ]SYALApGzQn[AѻP Linux A Linux B@Z~A٥iHEL~A Linux Server b Internet WѬAȪܡA scripts ٬Oh־Ǥ@ǧaIOH] scripts iH]pyoDUݭni椰ʧ@Iznpݳoӥ\IzbqeɭԡAMADQ@Ǥʥ]չϤJIFAoӮɭԦpGA Linux DiHzLyӫʥ]մX٬OsuѤANHצ IP zApGiH]pp\ܡAIiNoFFIz Linux DNiHOynorI smart!zFwD~A scripts ٦۷hBΥ\IҦpzQnb Linux W@A@~Aӳoӧ@~O@ǼƭȤ譱pAoӮɭ Scripts ]iHzpI٤ݭnΨ fortran, c o{yOI scripts NO@ӥiHΪ program oI۷ΧaIA scripts ̶}lQsϥΪ\NOyJ@Ǧb command line UFsOANLgJ scripts AӥѪ scripts ӱҰʤ@sꪺ command line OXJIzҦpG sWh ( iptables )A}J{Ǫ ( NOb /etc/rc.d/rc.local Y ) AOۦ\աI AFApGҼ{ program A scripts ]iHQAȬOڭ̧@jꪺOJb@ɮ̭AӪɮ״NiH桦@SSOqINOo²աI
t~t~Absg scripts ɡAb Linux A̱`ϥΪNO vi o@Mѽs边FAҥHoAF²ާڭ̪ Linux AI٬ODzߤ@UnFաInnrI ^_^
IbW@ bash shell F@ܼưաIuOաIAOFۦӨӪ scripts NNաIO script ڡHѦrWNӻA script NOy}B@zNAMFaINONڭ̭n檺eg@ӡy}zAtΨ̾ڳoӡy}zӰڭ̷QnFInFI{bڭ̨ӰQפ@Ug scripts nFIWA@ script Q檺ɭԡA bash |ڥHP_檺BJGMAbg@ scripts ɭԡA̦ni}nߺDG
- pGŪ@ Enter Ÿ] CR ^ANն}lӦROF
- pPe bash command 쪺AOhӪťշ|QF
- Ӫťզ]NQIAåB tab ]O|Qz|I
- ܩpG@檺eӦhAhiHϥ \ өܤU@F
- ~Aϥγ̦h # iѡI[b # ᭱rANQѤrӳQI
scripts oɮnpӰOH檺kءG
- ŧiϥΪ shell H]SOdNo@IAbYǪpAҦp /etc/crontab pUApGSŧiϥΪ shell A``|X{~TӾɭP scripts LkQI^
- script e\BTB@̡Bɤ
- C@ӤjBJDn\]]KѦۤvӭק蠟ΡI^
jPWNOo˰աIOKIٰOoڭ̦be@wgLFܼƪ]w觋FaHnFAڭ̴NHĤ@ scripts ӱNڭ̳]wܼƪL show XӡIIӳ]p@Uo script aI
- @ӬONɮק令iH檺ݩʡApchmod 755 scripts.file AMɮסF
- t@ثhOH sh oӰɨӰ script eAp sh scripts.fileI
nFAڭ̨ӫإ߲Ĥ@²檺 script aI²檺@ӨҤlANObùWCXy Hello ! How are you ?zAiHo˼gG]G̱`ϥΨӧ@ shell scripts g@nANO vi աIůunhx@U vi I^
[root @test /root]# mkdir test; cd test <==إߤ@ӷsؿAҦ scripts ȦsbI
[root @test test]# vi test01-hello.sh
#!/bin/bash <==b # [W ! P shell W١AΨӫŧiϥΪ shell
# oӸ}γ~bCX Hello ! How are you bùW
# ɤG 2002/05/20
# Made by VBird
hello=Hello\ \!\ How\ are\ you\ \? <==oNOܼưաI
echo $hello[root @test test]# sh test01-hello.sh
Hello ! How are you ? <=XGܦbùWIo̵L`N@UG
IܿħaIAwg|g scripts FIwg㦳춥{]pOoIIOıoI^_^...InFAۤUӧڭ̼gyL@IAY@ script YӥHWܼƭnۤޥΩOHIoӮɭԶKӤ@U " P ' PaI
- Ҧb scripts ̭FAWh ( pܼƳ]wWh ) ݭnP command line ɬۦPF
- scripts ɦW̦n .sh ѥLH{ѡF
- ëD[W .sh NiHOɡAٻݭndݨݩʤO_ x oݩʡC
[root @test test]# vi test02-2var.sh
#!/bin/bash
# oӸ}γ~bޥΨܼơAK@U " P ' P
# Date: 2002/06/27
# Made by VBird
name="V.Bird"
myname1="My name is $name"
myname2='My name is $name'
echo $name
echo $myname1
echo $myname2[root @test test]# sh test02-2var.sh
V.Bird
My name is V.Bird
My name is $nameݨXGFaIISI " P ' ̤jPNObणOyܼƤezաIA@Aӳy ' zYƳNܦyªrzӤOSrI
[root @test
test]# a=3
[root @test test]# b=5 [root @test test]# c=$a*$b [root @test test]# echo $c 3*5 <==V|IܦFrFHI |
o{FܡHKKIWXOOڭ̩ҧƱ檺 3*5 = 15 GHIoO]ڭ̨SwqܼAhܼƹw]Oe{yrzAI۵M $c NۦꫬAFIҥHڭ̻ݭnŧi@Uܼ]KKI{yܬ۪aI]OݭnŧiܼƪաI^AŧiܼƨϥΪO declare oӫOAܼƦW٦UooI
BAѤFaIHnFA{bڭ̨ӪݡApGzpGAݭnJ 2*3+5*13-32+25 ɡAåBb̫Xy Your result is ==> zӫ˼go@²檺 script OHiHo˸ոլݡG
- declare
ŧiܼƤe
ykG
[test @test test]# declare [-afirx]
ѼƻG
-a Gwq}C array
-f Gwq function
-i Gwq integer
-r GwqyŪz
-x GwqzLҿXܼ
dҡG
[test @test test]# declare -i a=3
[test @test test]# declare -i b=5
[test @test test]# declare -i c=$a*$b
[test @test test]# echo $c
15 <==ܦƦroI ^_^
[root @test test]# vi test03-declare.sh
#!/bin/bash
# This program is used to "declare" variables
# VBird 2002/06/27
number1=2*3+5*13-32+25
declare -i number2=2*3+5*13-32+25
echo "Your result is ==> $number1"
echo "Your result is ==> $number2"
[root @test test]# sh test03-declare.sh
Your result is ==> 2*3+5*13-32+25
Your result is ==> 64ˡHܦaIn٦bYIAUݤ@UaI
Oͦ scripts OH²աIҦpAb Windows w˵{ɡAtΤO``|X@ӵAݧAyU@BzByW@BzΡyzܡHNOͰաI{|̾ڱzJƨӶiP_AOKI²檺ͦOOOHINO read oӫOաI read \NOy̾ڱzbLJG input ܼƤezAҦpG
[root @test test]# read name
VBird <==oOLJG
[root @test test]# echo $name
VBirdnFIڭ̨ӳ]w@UAz script b檺ɭԡANzLJƦCXӡIpOH
[root @test test]# vi test04-read.sh
#!/bin/bash
# This program is used to "read" variables
# VBird 2002/06/27
echo "Please keyin your name, and press Enter to start."
read name
echo "This is your keyin data ==> $name"
[root @test test]# sh test04-read.sh
Please keyin your name, and press Enter to start.
VBird Tsai
This is your keyin data ==> VBird TsaiNOo²Aڭ̫᭱ٷ|~ͨPOAӮɭԿJƥiNnFI
nFIU@Bڭ̦Aӻ@˩wq@ script ѼƪNIHHUڭ̪ҡG
[root @test test]# myscript opt1 opt2 opt3 opt4
@@@@@@@@@@$0@@@ $1@ $2@ $3 @$4oONOHKKINOAbo script ] myscript ^̭AunܼƦW٬ $0 Nܬ myscript oөNNA]NOG
$0 : myscript YO script ɦWo˻γ\OܲMAڭ̨Ӫ@Uo script ݬݴNoLNաI
$1 : opt1 YOĤ@Ӫ[Ѽ (parameter)
$2 : opt2
$3 : opt3
[root @test test]# vi test05-0123
#!/bin/bash
# This program will define what is the parameters
# VBird 2002/06/27
echo "This script's name => $0"
echo "parameters $1 $2 $3"
[root @test test]# sh test05-0123 pa1 pa2 pa3
This script's name => test05-0123
parameters pa1 pa2 pa3oӪFbBΤW]O۷nAҦpzno script Wٮɡ]]ɭԨϥΪ̷|ۦɮצW١^Ahoӥ\ܼƴN۷nFIAѥGIH
AӪoӪFiNnFAרb scripts INpypPwYɮשΥؿAΪ̬OpPw{Ӵ¦VӤVizHoӪFݭnn@Ǫ跧~IUڭ̤O@UP_PB⦡AAӳ]wXӤp scripts ոլݤPΪkAHojaAoI
|
|
1. | ɮPؿҡI |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. | {ǪҡI |
|
|
|
|
|
|
3. | ɮתݩʰI |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4. | ɮפP_P FҦpy test file1 -nt file2 z |
|
|
|
|
|
|
5. | 𫍧yM(and)zy(or)z |
|
|
|
|
쪺ӺO 1, 3 oغP_AרObإߤ@ permission ɮɡAoӴNnFIMᨺӡyɮפP_z]ON䪺IŪܤhդ@եhI٦A && || oӪF]OܭnIۤUӡAڭ̭nӽͤ@BŸoI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
P_P if...then...fi YOKiAڭ̩UNӽͤ@ͳo@ӧP_̱`ϥΪykaI
OKIڭ إߤFĤ@ script AbùWH script ӿXݭԻyInFA{bڭ̦pGn scripts [WyP_znpӤu@OHoNOҿתP_FI̱`ϥΨ쪺NOy if ... then .... else if .... then ... end if z@kFIoӱP_ykG
if [ P_@ ] && (||) [ P_G ]; then <== if O_lNA᭱iHYzӧP_Aϥ && ||
椺e{
elif [ P_T ] && (||) [ P_| ]; then <==ĤGqP_ApGĤ@qSŦXNӦjM
ĤGqe{
else <==eqŦXɡANHoqeӰI
ĤTqe{
fi <== if then P_IWNOoo˪Gby[]z̭OApGOƦXP_]pYABhCP_^ANݭnbӤ[Wy && (and)zΪ̬Oy || (or)zo˪B⦡~IpGOhܪܡANݭnH elif ]optional, ܩʪAYݭn~[WI^ӷsWt@ӱFpGҦAΡAhϥ else ]optional^Ӷi̫᪺椺eoI
LAo̦Xӷs`Ǫ~Aڭ̻ݭnӥ[j@UGרO̫@IA̮eǪաInFAڭ̨Ӷi@²檺POnFI
- b [ ] Au@ӧPOF
- b [ ] P [ ] AiHϥ && || Ӳ´POF
- C@ӿWߪyݭnťӹj}zI
[root @test test]# vi test06-ifthen.sh
#!/bin/bash
# This program is used to study if then
# VBird 2002/06/27
echo "Press y to continue"
read yn
if [ "$yn" = "y" ]; then
echo "script is running..."
else
echo "STOP!"
fi
[root @test test]# sh test06-ifthen.sh
Press y to continue
y
script is running...
[root @test test]$ sh test06-ifthen.sh
Press y to continue
n
STOP!²檺@ӨҤlaIJ y ɭԡANLiAYD y hHiIOo̦ӰDANOpGڿJ Y ɡA{٬OFIHIoӮɭԴNݭnϥΨ || oӪFաIڭ̥iHo˰I
[root @test test]# cp test06-ifthen.sh test07-ifthen.sh
[root @test test]# vi test07-ifthen.sh
#!/bin/bash
# This program is used to study if then
# VBird 2002/06/27
echo "Press y to continue"
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "script is running..."
else
echo "STOP!"
fi
[root @test test]# sh test07-ifthen.sh
Press y to continue
y
script is running...
[root @test test]$ sh test07-ifthen.sh
Press y to continue
Y
script is running...nFIpGA[WeLG parameter ΩOHIoӤ]Z쪺Aڭ̦AӸոլݡG
[root @test test]# vi test08-ifthen.sh
#!/bin/bash
# set parameters in the if then
# ݭn[W hello oӰѼƤ~|ܥTI
# VBird 2002/06/27
if [ "$1" = "hello" ]; then
echo "Hello! How are you ?"
elif [ "$1" = "" ]; then
echo "You MUST input parameters"
else
echo "The only accept parameter is hello"
fi
[root @test test]# sh test08-ifthen.sh hello
Hello! How are you ?
[root @test test]$ sh test08-ifthen.sh
You MUST input parameters
[root @test test]$ sh test08-ifthen.sh djdkf
The only accept parameter is helloIOOOHoӹ scripts {Ѧ@w{תAѤFaIInFAUڭ̨Ӫ@ӤjI]zwgD netstat P grep oӪF𫍧ΪkApGnӰADW port O_}ҮɡAiHϥΩUdҨӶiG
[test @test test]# vi port.sh <==s@ɮ test1.sh script
#!/bin/bash <==ŧiϥΪ shell
# program: Using to study the [if ... then ... fi] program
# Made by: VBird
# date: 2002/05/20
# content: I will using this program to show your services
# 1. print the program's work in your screen
echo "Now, the services of your Linux system will be detect!"
echo "The www, ftp, ssh, and sendmail + pop3 will be detect!"
echo " "
# 2. www
www=`netstat -an|grep LISTEN|grep :80` <==oӴNOܼưաIèϥΤFuROI
if [ "$www" != "" ]; then <==}lP_oI
echo "WWW is running" <==YߡANCLo@檺eI
else
echo "WWW is NOT running"
fi
# 3. ftp
ftp=`netstat -an|grep LISTEN|grep :21`
if [ "$ftp" != "" ]; then
echo "FTP is running"
else
echo "FTP is NOT running"
fi
# 4. ssh
ssh=`netstat -an|grep LISTEN|grep :22`
if [ "$ssh" != "" ]; then
echo "SSH is running"
else
echo "SSH is NOT running"
fi
# 5. sendmail + pop3
smtp=`netstat -an|grep LISTEN|grep :25`
pop3=`netstat -an|grep LISTEN|grep :110`
if [ "$smtp" != "" ] && [ "$pop3" != "" ]; then <==ӥHWANϥ && || ӤjI
echo "sendmail is OK!"
elif [ "$smtp" != "" ] && [ "$pop3" = "" ]; then
echo "sendmail have some problem of your pop3"
elif [ "$smtp" = "" ] && [ "$pop3" != "" ]; then
echo "sendmail have some problem of your smtp"
else
echo "sendmail is NOT running"
fi
[test @test test]# sh port.sh <==ݬݿXGI
Now, the services of your Linux system will be detect!
The www, ftp, ssh, and sendmail + pop3 will be detect!WWW is running
FTP is running
SSH is running
sendmail is OK!²aIWo˴NiHNADWƶiѪRoI
𫍧y if then fi zΦOH{ӦۦP_ApGڤwgWnXӶحnӰAunܰ檺y觋zNiHT檺AnOH²檺ҤlNOڭ̱``ϥΨ쪺 /etc/rc.d/init.d/ Y scripts oIҦpGsҰ xinetd OϥΡG/etc/rc.d/init.d/xinetd restart`NoIӬO restart ءAM script N|۰ʪhjM restart ظ̭phIӴNO case ... esac ϥμҦoIS`NA}lOy case zhOϥ case ˼gy esac zܡIܦaIoخ榡O˩OH
case 觋(string) in <==}lqAӺ觋iAq`ϥ $1 o@تUFI
觋@)
{q
;; <==觋@ŸI
觋G)
{q
;;
*)
echo "Usage: {觋@|觋G}" <==CXiHQΪѼƭȡI
exit 1
esac <==o case ]wBIb觋(string)榡DnءG
P˪Aڭ̫إߤ@ӦW test2.sh ɮרӸհݬݡCpڭ̦@iTq榡Ӷi@AO one, two, three Að]ϥΪUFAhiHgG
- UFGNOHy ɮ + string z觋Ӱ檺(/etc/rc.d/init.d Y]w觋^Ah string iHgy $1 z]bɮ᭱[JѼƪĤ@ӰѼơI^
- ʦGNOѿùXiءAMϥΪ̿JAoӳq`tXy read variable zM string hgy $variable z榡I
[test @test test]# vi test09-case.sh
#!/bin/bash
# program: Using case mode
# Made by: VBird
# date: 2002/05/20
# content: I will use this program to study the case mode!
# 1. print this program
echo "This program will print your selection!"case $1 in <==ϥΪUFOAI
one)
echo "your choice is one"
;;
two)
echo "your choice is two"
;;
three)
echo "your choice is three"
;;
*)
echo "Usage {one|two|three}" <==CXiHϥΪѼơ]pGϥΪ̤UF~ѼƮɡ^
exit 1
esac
[test @test test]# sh test09-case.sh <==浲GIܨS۹諸ѼơIҥHCXiHѼơI
This program will print your selection!
Usage {one|two|three}
[test @test test]# sh test09-case.sh three
This program will print your selection!
your choice is threeͦ case SpOHIڭ̧QΤW觋ӭק@UeoI
[root @test test]# vi test10-case.sh
#!/bin/bash
# program: Using case mode
# Made by: VBird
# date: 2002/06/27
# content: I will use this program to study the case mode!
# 1. print this program
echo "Press your select one, two, three"
read numbercase $number in
one)
echo "your choice is one"
;;
two)
echo "your choice is two"
;;
three)
echo "your choice is three"
;;
*)
echo "Usage {one|two|three}"
exit 1
esac
[root @test test]# sh test10-case.sh
Press your select one, two, three
two <=o@OzJI
your choice is twopI²aIH /etc/rc.d/init.d/ Y script NӬݪFaI~Aѩ٦ҿתy(function)z]NOyNݭn檺{qg@Ӥp϶AӳoӤp϶hH@ӦW٨ӨNzA²檺觋iHбzѦҤ@UztΤ /etc/rc.d/init.d/sendmail I`Nݤ@U start() UǭөNNIANiHDNFIѩڭ̳ǫäЧApg{]WA scripts NOp{աI٦nI VBird HeN{lIMٯu script OI^AҥHNunI쬰oI
b{qA̱`ϥΨ쪺NOjFIjOܭn@uAרO㦳P_ΦjAܱ`QϥΨӧP_@ǨƶiʻP_IO{Dɭӭnoӵ{OHINݭn[JP_oInFA²檺P_iHOUXءGfor OwgDh֭ run FAYOwgDn]XFAܩ until P while hOOG
- for (( @; G; T ))
- for variable in variable1 variable2 .....
- while [ condition1 ] && { || } [ condition2 ] ...
- until [ condition1 ] && { || } [ condition2 ] ...
o̤ӬۦPաI
- yuntilGۦPɭԤ~}{zF
- ywhileGۦPɭԡAN~Iz
nFIڭ̥ӽͤ@U²檺jANOQ for oӪFӶiInFA]ڭ̭p 1 + 2 + 3 .... + 100 AH script npgOHܦh觋Aڭ̨ӽͤ@ do...done nFI
[test @test test]# vi test11-loop.sh
#!/bin/bash
# Using for and loop
# VBird 2002/06/27
declare -i s # <==ܼƫŧi
for (( i=1; i<=100; i=i+1 ))
do
s=s+i
done
echo "The count is ==> $s"[test @test test]# sh test11-loop.sh
The count is ==> 5050Ъ`NI for (( @; G; T)) oOnI
ҥHաIWҤlOG i=1 }l i<= 100 AC i [@Ӱ橳U{q]NO s=s+i ^A i >100 ]]NO i=101 ^NXo@q{qIˡIaI
- @GoiHݦOylȡzApWҤlAlȬO i=1 աI
- GGoiHݦOyŦXȡzApWҤlA i<=100 ɭԳOŦXI
- TGoiHݦOyBzI]NOA i C[@I
nFIϥ while Ϊ̬O until n˰OH곣OthpIڭ̨ϥΩU script Ӷi 1 ~ 100 ֥[ʧ@I
1. ϥ while G
[test @test test]# vi test12-loop.sh
#!/bin/bash
# Using while and loop
# VBird 2002/06/27
declare -i i
declare -i s
while [ "$i" != "101" ]
do
s=s+i
i=i+1
done
echo "The count is ==> $s"2. ϥ until G
[test @test test]# vi test13-loop.sh
#!/bin/bash
# Using until and loop
# VBird 2002/06/27
declare -i i
declare -i s
until [ "$i" = "101" ]
do
s=s+i
i=i+1
done
echo "The count is ==> $s"[test @test test]# sh test12-loop.sh
The count is ==> 5050HHHHI²aI
ĤGӨҤlӦ۩ jony ѡIoOt~@ذj骺觋AiHΨӧP_DƦrI
[test @test test]# vi test14-for.sh
#!/bin/bash
# using for...do ....done
# VBird 2002/06/27LIST="Tomy Jony Mary Geoge"
for i in $LIST
do
echo $i
done[test @test test]# sh test5.sh
Tomy
Jony
Mary
Geogeo@خ榡OHť@ i oܼƪܶءI]NOAW $LIST oܼƷAHťӤjɭԡA@iHXӥ|ӡIҥHoIH do ..... done ... NiHOgX|өNNաInաISkQγoӪFӱNA Linux DWb ( account ) LXөOHI²rIڭ̧Q cut sort H /etc/passwd oɮרӧo@ script A@kpUoG
[test @test test]# vi test15-for.sh
#!/bin/bash
# Using for and loop to read the account of this linux server!
# VBird 2002/06/27
account=`cut -d ":" -f1 /etc/passwd|sort`
echo "The following is your linux server's account"for i in $account
do
echo $i
done[test @test test]# sh test15-for.sh
The following is your linux server's account
adm
aerosol
alenchan
amanda
apache
....OKIAӡAڭ̨ӨϥΤ@Uͦj@ΧaIIڭ̿J y Y ɡA{NHIӫ˰HI
[test @test test]# vi test16-loop.sh
#!/bin/bash
# Using until
# VBird 2002/06/27echo "Press Y/y to stop"
until [ "$yn" = "Y" ] || [ "$yn" = "y" ]
do
read yn
done
echo "Stop here"[test @test test]# sh test16-for.sh
Press Y/y to stopGDSG
A
Y
Stop hereWOAJ Y Ϊ̬O y ɤ~X do...done j𫗪Iӥh橳UFIIܦnaIIۤUӡAڭ̨ӧP_@UؿO_sbnFIoO`ΪI
Uӧڭ̧PO@UҿתyP_zϥΤ觋աIڭ̤OwgDFܡAڭ̥iHϥαP__w쩳Sɮס] -e ^Ϊ̬OӦW٬OݩؿΪ̬Oɮס] -d -f ^AUӧڭ̨ӧP_@Ӭy{nFGݰ_ӦGܽA²檺աIڭ̨ӸոլݡG
- dݤ@U /root/test/logical oӦW٬O_sbF
- YsbAhإߤ@ɮסAϥ touch ӫإߡAإߧ}F
- pGsbܡAP_ӦW٬O_ɮסAYɮhNRإߤ@ɮסAɦW logical A}F
- pGsbܡAӥBӦW٬ؿAhؿI
[test @test test]# vi test17-ifthen.sh
#!/bin/bash
# using if and then to select file or directory
# VBird 2002/06/27
if [ ! -e logical ]; then
touch logical
echo "Just make a file logical"
exit 1
elif [ -e logical ] && [ -f logical ]; then
rm logical
mkdir logical
echo "remove file ==> logical"
echo "and make directory logical"
exit 1
elif [ -e logical ] && [ -d logical ]; then
rm -rf logical
echo "remove directory ==> logical"
exit 1
else
echo "Does here have anything?"
fiMЧA̧ǰ sh test17-ifthen.sh ; ll ݬݳoӥؿU logical ɮצܤƪpIIAѤFܡHNOo²IoӰʧ@iHڭ̫ܻPNPOYɮתsbP_IIΡI֨ӨϥάݬݧaI
scripts b椧eA̩ȪNOX{DFIڭ̦p debug OHSkݭnzL scripts NiHӧP_O_DOIHIMOIڭ̴NH sh ӶiP_aI
[test @test test]# sh [-nvx] scripts
-n Gn scripts Ad scripts ykAY~hHCXI
-v Gb scripts eAN scripts eܦbùWF
-x GNϥΨ쪺 scripts eܦbùWAP -v yLPI
[test @test test]# sh -n test01-hello.sh
[test @test test]# sh -v test01-hello.sh
#!/bin/bash
# This program will print the "Hello! How are you" in your monitor
# Date: 2002/06/27
# User: VBird
hello="Hello! How are you"
echo $hello
Hello! How are you
[test @test test]# sh -x test01-hello.sh
+ hello=Hello! How are you
+ echo 'Hello!' How are you
Hello! How are youx sh ΪkANiHϱzbz Linux L{oI
@
Shell scripts DzߤkWAݭnyhݡBhҥBå[Hק令ۤv˦IzO̧֪DzߤqFIW۷hBͦb}o@Ǭ۷Ϊ scripts AYOziHN𫍧 scripts ӡAåB令AXۤvDˤlIDzߪĪG|O̧֪OI