CONTINUE(1SH) COMMAND REFERENCE CONTINUE(1SH) NAME continue - resume next iteration of for or while loop (sh built-in) SYNOPSIS continue DESCRIPTION Continue resumes the next iteration of the enclosing for or while loop. EXAMPLES The following example is a shell script which prints the name of each subdirectory in the current directory and asks the user if he or she wants a listing of the contents of that directory. If the reply is n, (for no) the directory is not listed. This example makes use of continue in two places: the first usage makes sure that only directories may be listed and the second usage processes the user's reply. #!/bin/sh for i in * { if test ! -d "$i" then continue fi echo -n "Do you want to list the directory $i? " read f if test "n" = "$f" then continue fi ls "$i" } RETURN VALUE [NO_ERRS] Command completed without error. SEE ALSO break(1sh), cd(1sh), chdir(1sh), continue(1csh), csh(1csh), echo(1sh), eval(1sh), exec(1sh), exit(1sh), export(1sh), hash(1sh), login(1), pwd(1sh), read(1sh), readonly(1sh), return(1sh), set(1sh), sh(1sh), shift(1sh), test(1sh), times(1sh), trap(1sh), type(1sh), ulimit(1sh), umask(1sh), unset(1sh), wait(1sh), which(1sh), and execve(2). Printed 5/12/88 1
%%index%% na:384,128; sy:512,184; de:696,365; ex:1061,1004; rv:2065,177; se:2242,889; %%index%%000000000109