GOTO(1CSH) COMMAND REFERENCE GOTO(1CSH) NAME goto - jump to labeled line (csh built-in) SYNOPSIS goto word DESCRIPTION The specified word is filename and command expanded to yield a label. The shell searches for a line of the form label:, rewinding the input as far as possible, or prompting for input if the label has not been defined. Execution continues after the labelled line. EXAMPLES The following shell script looks through each of the files given. If any of the files does not contain a ``comment'' line (a line that begins with a `#'), the script prints a message and aborts. #!/bin/csh -f set OK=no foreach File ($argv) grep -l '^#' "$File" >& /dev/null if ($status != 0) goto abort cat "$File" set OK=yes end if (OK == "yes") exit abort: echo "Command aborted : $File contains no comment lines." exit 1 CAVEATS The functionality of this command can be obtained by using continue(1csh) and break(1csh) without the trouble of seeking through the input. SEE ALSO @(1csh), alias(1csh), bg(1csh), break(1csh), break(1sh), cd(1csh), chdir(1csh), continue(1csh), continue(1sh), csh(1csh), dirs(1csh), echo(1csh), eval(1csh), exec(1csh), exit(1csh), fg(1csh), glob(1csh), grep(1), hashstat(1csh), history(1csh), jobs(1csh), kill(1csh), limit(1csh), logout(1csh), nice(1csh), nohup(1csh), notify(1csh), onintr(1csh), popd(1csh), pushd(1csh), rehash(1csh), repeat(1csh), set(1csh), setenv(1csh), sh(1sh), shift(1csh), source(1csh), stop(1csh), suspend(1csh), time(1csh), umask(1csh), unhash(1csh), unalias(1csh), unlimit(1csh), unset(1csh), unsetenv(1csh), wait(1csh), and which(1csh). Printed 5/12/88 1
%%index%% na:312,124; sy:436,153; de:589,440; ex:1029,686; ca:1715,276; se:1991,1593; %%index%%000000000109