ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahz_5.4.0.1/untilcmd.htm

47 lines
1.0 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8">
<title>Until command</title>
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</HEAD>
<body bgcolor="#FFFFFF">
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h2>Until command</h2>
<p>The syntax of the <strong>until</strong> command is</p>
<p><strong>until</strong> <em>list1</em></p>
<p><strong>do</strong> <em>list2</em></p>
<p><strong>done</strong></p>
<p><strong>qsh</strong> runs the two lists repeatedly while the
exit status of <em>list1</em> is non-zero. When the exit status of
<em>list1</em> is zero the command completes.</p>
<p><strong>Examples</strong></p>
<ol>
<li>An until command to iterate until a condition is met.
<pre>
max=100
index=0
until [[ $index -eq $max ]] ; do
echo Index is $index
let index+=1
done
</pre>
</li>
</ol>
</body>
</html>