clarify various entries

This commit is contained in:
Malin Freeborn
2021-05-15 16:41:45 +02:00
parent 95d9ddf031
commit 4f1ca14d02
9 changed files with 101 additions and 305 deletions

View File

@@ -39,22 +39,18 @@ case $CRE in
esac
# While and Until
This prints from 10 until 2.
This prints from 1 until 9.
> declare -i COUNTER
> COUNTER=1
> COUNTER=10
> while [ $COUNTER -lt 2 ]; do
> while [ $COUNTER -gt 2 ]; do
> ((COUNTER++))
> echo The counter is $COUNTER
> COUNTER=COUNTER-1
> echo $COUNTER
> done
> exit 0
```
There's also 'until', which stops when something is true, rather than keeping going when something is true.