June 2004
Intermediate to advanced
1056 pages
39h 58m
English
while
while
(
expression
)
commands
end
As long as expression is true (evaluates
to nonzero), evaluate commands between
while and end. break and continue can terminate or continue the loop.
set user = (alice bob carol ted)while ($argv[1] != $user[1])Cycle through each user, checking for a matchshift userIf we cycled through with no match...if ($#user = = 0) thenecho "$argv[1] is not on the list of users"exit 1endifend
Read now
Unlock full access