4、 esac done #!/bin/shvar1="abcd efg"echo$var1var2=1234echo"Thevalueofvar2is$var2"echo $HOMEecho $PATHecho $PWD#!/bin/shnum=0while[$num-le10]do num=`expr$num+1` if[$num-eq5] then continue fi square=`expr$num*$num` echo$squaredone#!/bin/bash #Gnubashversions2.x#TheParty
5、Program--Invitationstofriendsfromthe #"guest"file guestfile=./guests # ~/shell/guestsif[[!-e"$guestfile"]] then printf"${guestfile##*/}non-existent" exit1fiexportPLACE="Sarotini's"((Time=$(date+%H)+1))setcheesecrackersshrimpdrinks"hotdogs"sandwiches forpersonin$(cat$guestfile) do if [[$
6、person=root]] then continue else #Startofheredocument mail-v-s"Party"$person Hi${person}!Pleasejoinmeat$PLACEforaparty! Meetmeat$Timeo'clock. I'llbringtheicecream.Wouldyoupleasebring$1 andanythingelseyouwouldliketoeat?Letmekno
7、w ifyoucan'tmakeit. Hopetoseeyousoon. Yourpal, ellie@$(hostname) FINIS shift if(($#== 0)) then se