manpagez: man pages & more
man break(1)
Home | html | info | man
break(1)                             fish                             break(1)




NAME

       break - stop the innermost currently evaluated loop


   Synopsis
       LOOP_CONSTRUCT; [COMMANDS...] break; [COMMANDS...] end

   Description
       The break builtin is used to halt a currently running loop, such as a
       for loop or a while loop. It is usually added inside of a conditional
       block such as an if statement or a switch statement.

   Example
       The following code searches all .c files for smurfs, and halts at the
       first occurrence.



       for i in *.c
           if grep smurf $i
               echo Smurfs are present in $i
               break
           end
       end





Version 1.23.1                    8 Mar 2009                          break(1)

fish 1.23.1 - Generated Sun Mar 8 13:50:15 CDT 2009
© manpagez.com 2000-2021
Individual documents may contain additional copyright information.