I want to run the command
find some/path -exec program \\{} \\;
but I want the find command to quit as soon as the command
You could pipe the output from find to another subprocess and use while/break:
find
while
break
find some/path | while read f do program $f if [ $? -ne 0 ] then break fi done