break - UDM Command

Syntax

break

 

Description

The break command stops iterating through a forfiles loop and picks up execution at the script line immediately following the end statement marking the end of the forfiles loop.

 

Example

To iterate through the files on a machine and attempt to delete each file (if the delete operation fails, UDM breaks out of the loop):

forfiles local=*
  delete $(_path)
  if $(_lastrc) NE 0
     print msg="Failed to delete $(_path)"
     break
  end
end