answersLogoWhite

0

Both loop constructs have the same syntax:

while [test expression]

do

commands

done

until [test expression]

do

commands

done

Where they differ is that the 'while' loop only executes where the test expression evaluates as True, whereas the 'until' loop executes where the expression evaluates as False.

Functionally, you could achieve the same result using either loop construct by altering the test expression. Eg.:

while [n -gt 5] #n is greater than 5

is functionally identical to

until [n -le 5] #n is less than or equal to 5

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the difference between man and info in Linux?

They are different ways of presenting documentation for applications in Linux. man pages are typically single pages, while info pages are somewhat more friendly looking, and spread out across multiple pages.


How find boottime of os in Linux?

grab a stopwatch and boot the system up while timing it until it gets to login


What is the difference between Windows 95 and ubuntu?

ten or more years of development depending on your version of Ubuntu. Ubuntu is a modern Linux distribution while windows 95 is an aging and unsupported parent of the current windows environment.


What is the difference between it's and it?

the difference between it's and it..is that it's means it is, while "it" is direct to the object .


What is different between different and difference?

Different is an adjective while difference is a noun


How does suse linux enterprise server differ from suse linux professinal?

SUSE Enterprise is made to run on servers(which use different platforms to organize the web page) while SUSE Linux professional is desktop Linux with special mods and cool platforms for high tech work in offices and studios.


What is the difference between concentrated and concentration?

the difference between concentrated and dilute is concentrated is larger while dilute is smaller.


What is the difference between do while and do until loop in vb programming?

Do while and Do until are interchangeable, and they take the opposite condition. Do While executed the body of the loop while (condition=true), and Do until executes body of loop until (condition=true). For example, if I was doing a Loop to say, while the check box is checked, display a message box (Never do this btw, it's just an example) I could either say Do While (MyCheckBox.Checked = True) Loop or Do Until (MyCheckBox.Checked <> True) Loop


What is the difference between baseball and softballs base running?

In baseball they can leave while the pitcher still has the Ball. but in softball they have to wait until the ball is released from the pitchers hand.


What's the difference between "i" and "I" in terms of capitalization?

The difference between "i" and "I" is that "I" is always capitalized when referring to oneself as a pronoun, while "i" is not capitalized.


What is the difference between science and literature?

There are allot of difference but the main difference is the science is discovered while the literature is invented


What is Red Hat Enterprise Linux used for?

red hat enterprise Linux is used as a server while red hat Linux is used as client..