vault backup: 2024-05-30 18:23:46
This commit is contained in:
parent
3ffea3c144
commit
997b584c40
@ -75,12 +75,12 @@ esac
|
|||||||
### For loops
|
### For loops
|
||||||
`for` loops are used when you have a finite collection over which you want to iterate, such as a list of files, or a list of server names:
|
`for` loops are used when you have a finite collection over which you want to iterate, such as a list of files, or a list of server names:
|
||||||
```bash
|
```bash
|
||||||
|
|
||||||
THINGS="thingone thingtwo thingthree"
|
THINGS="thingone thingtwo thingthree"
|
||||||
for S in $THINGS; do
|
for THING in $THINGS; do
|
||||||
echo "Doing something to $S"
|
echo "Doing something to $THING"
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
### While loops
|
### While loops
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
Loading…
Reference in New Issue
Block a user