Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix until and while

Quick links

About until, while
Syntax
Examples
Related commands
Linux / Unix main page

About until and while

Shell built-in functions to repetitively execute a set of actions while/until conditions are evaluated TRUE.

Syntax

while [ conditions ] ; do actions ; done

until [ conditions ] ; do actions ; done

Examples

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.

Related commands

break
csh
ksh
sh

 

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope