Linux until and while
Updated: 05/04/2019 by Computer Hope
If until is used, the block loops as long as the condition is false. When the condition is true, the loop terminates.
while [ conditions ] ; do actions ; done
until [ conditions ] ; do actions ; done
filename=anything while [ $filename ] do echo "file?" read filename # read from terminal find . -name $filename -print done
User is repeated prompted for a name of a file to be located, until the user chooses to finish execution.