Loop structures: Difference between revisions
Content added Content deleted
(→while) |
(→while) |
||
Line 815: | Line 815: | ||
===while=== |
===while=== |
||
'''Interpreter:''' [[bourne SHell]] |
'''Interpreter:''' [[bourne SHell]] |
||
#!/bin/sh |
#!/bin/sh |
||
# repeat a command 100 times |
|||
x=1 |
x=1 |
||
while [ $x -lt 101 ] |
while [ $x -lt 101 ] |
||
Line 825: | Line 825: | ||
'''Interpreter:''' [[Bourne Again SHell]] |
'''Interpreter:''' [[Bourne Again SHell]] |
||
#!/bin/bash |
#!/bin/bash |
||
while true |
while true |