¥More Shell Commands: basic
flow control
_commands: if, else, endif, while, end, foreach
"
if ( $user == "elvis" )
then
"
echo 'the king lives!'
"
endif
"
"
set value = 5
"
set fact = 1
"
while ( $value > 0 )
" @ fact = $fact *
$value
" @ value -= 1
"
end
"
echo 5 factorial = $fact
"
"
foreach value ( 1 2 3 four eight 11
)
" echo the current value is
$value
"
end
"
"
foreach file ( I.*3 )
" ls -l $file
"
end