Skip to content
BWORK

ACADEMIC

  • HOME
  • GNU AND LINUX KERNEL
  • GITHUB
  • BLOG
  • SOURCES
  • LEGAL
  • OTHER
    • ALGORITHM
    • DESIGN
    • READER

A look into the bash builtin command named “until”

Jeffrin July 16, 2019 Bash, Bash Builtin do, done, loop, until

ABOUT until

until command in Linux used to execute a set of commands as long as the final command in the ‘until’
Commands has an exit status which is not zero. It is mostly used where the user needs to execute a set of
commands until a condition is true.

A TYPICAL SHELL EXPOSURE
[bash]
$i=0 ; until ((i > 5)) ; do echo $i; ((i = $i +1)) ; done
0
1
2
3
4
5
$i=0 ; until ((i > 5)) ; do echo $i; ((i++)) ; done
0
1
2
3
4
5
$i=0 ; until ((i > 1)) ; do echo $i; ((i++)) ; done
0
1
$i=0 ; until ((i > 5)) ; do echo $?; ((i++)) ; done
1
1
1
1
1
1
$

[/bash]
LINKS
https://www.geeksforgeeks.org/until-command-in-linux-with-examples/
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_03.html

Sessions of bash builtin command named "times"PREV
Simple example of a bash builtin command named "wait"NEXT

menu-bottom

  • SYSTEM
  • ALGORITHMS
  • TRUEANGLE
  • DOLLECT
  • DATABASE
  • GRAPHICS

Archives

Search

Created with Taproot