csh实例 参考:
#
!/bin/csh -vx
#csh -vx show the command before running to help debug
#just to check syntax
#csh -n $0
#argv
if ($ # argv < 2) then
echo " Sorry, but you entered too few parameters "
echo " usage: $0 arg1 arg2
exit
endif
set arg1 = $1
set arg2 = #2
foreach i ($*)
echo $i
end
#execute commands
echo "Hello there `whoami`. How are you today? "
echo "You are currently using `hostna
#csh -vx show the command before running to help debug
#just to check syntax
#csh -n $0
#argv
if ($ # argv < 2) then
echo " Sorry, but you entered too few parameters "
echo " usage: $0 arg1 arg2
exit
endif
set arg1 = $1
set arg2 = #2
foreach i ($*)
echo $i
end
#execute commands
echo "Hello there `whoami`. How are you today? "
echo "You are currently using `hostna