Everything Shell Script

  • Home
  • Home

Wednesday, 26 October 2016

Until Loop in Shell Script.

 Niraj Bhagchandani     10:43:00     No comments   

To run these programs online I request you to go to following link: https://goo.gl/xKheU3
  1. The until loop is similar to while loop in shell scripting. But the major difference in two of them is
  2. Until loop executes the statement executes its code-block while its conditional expression is false,
  3. While loop statement executes its code block while its conditional expression is true.
The syntax for until expression is:

syntax
until expression
do
    command1
    command2
    command3
    .
    .
    .
    commandN
done


The above syntax indicates
until do and done are keywords
expression is any conditional expression (termed here to be false)

filename: main.sh
Let us review one example for until loop.

until [[ $var -le 6 ]]
do
    echo "Variable: $var"
    (( var++ ))
done


Thank you for watching this article.

Regards
Niraj Bhagchandani.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Amazon Ads

Popular Posts

  • 12 differnet examples of For Loop in Shell Script
    The Link to programs given in this tutorial is:  https://goo.gl/akbcTw Well, to begin with FOR LOOP, I would tell that there are 2 diff...
  • Powerline – Adds Powerful Statuslines and Prompts to Vim Editor and Bash Terminal
    Powerline is a great statusline plugin for Vim editor , which is developed in Python and provides statuslines and prompts for many other...
  • How to install Docker and run Docker containers on Linux Mint 18/18.1
         How to install Docker and run Docker containers on Linux Mint 18/18.1 So, now before going through all the steps update and upg...
  • While Loop in Shell Script
    To run the given example live online please visit the following link: https://goo.gl/mD69Gj There are basic loops in shell script. For ...
  • Until Loop in Shell Script.
    To run these programs online I request you to go to following link: https://goo.gl/xKheU3 The until loop is similar to while loop in shel...
  • Variables in Shell Script - Part 1
      Every Programming language in existence has the concepts of variable – It can be termed as a chunk of memory which can be assigned valu...
  • Escape character in Shell Script
    Okay!! uptil now we have seen a lot of stuffs regarding Shell Script. But how about escape characters Example: What if you want to displa...
  • Wildcards
     A wildcard is a character that can be used as a substitute for any of a class of characters in a search, thereby greatly increasin...
  • My First Shell Script.
    My First Shell script We are about to write a script for Hello World. After that we will have some flavors of Hello World Program. Fir...

Recent Posts

Categories

  • Docker in Mint 18.1
  • Docker Linux Mint
  • Install Docker
  • Install Docker in Mint 18
  • Install Docker Linux Mint
  • tecmint

Pages

  • Home

Text Widget

Blog Archive

  • ►  2017 (1)
    • ►  June (1)
  • ▼  2016 (8)
    • ►  November (1)
    • ▼  October (7)
      • Until Loop in Shell Script.
      • While Loop in Shell Script
      • 12 differnet examples of For Loop in Shell Script
      • Escape character in Shell Script
      • Wildcards
      • Variables in Shell Script - Part 1
      • My First Shell Script.

Page Views:

About Me

Niraj Bhagchandani
View my complete profile

Search Here:

Powered by Blogger.

Sample Text

Copyright © Everything Shell Script | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates