Basic Shell Scripting: Chapter-V

Loop in Shell Script: (while, until, for)

The while executes a piece of code if the control expression is true, and only stops when it is false.

While Statement Example:

The until loop is almost equal to the while loop, except that the code is executed while the control expression evaluates to false.

Until Statement Example:

The for loop let’s you iterate over a series of ‘words’ within a string.

For Statement Example:

Previous Chapter

Next Chapter

The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply