Linux : loop commands using ‘while’


In this series of mini posts I will teach you a Linux lesson every day, it can be command , tricks , how to etc. The post will cover for beginner to advanced level. Welcome to Linux terminal.

Follow us and start learning Linux today

while

If you are familiar with C/C++ or any programming language, may know what a while loop is does. While is a Linux command to help us to execute commands until the given condition return (command) is false

$ while
  commands;
do command ;
done

Following Linux manuals may help you

Published by

Manoj

A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.