This commit is contained in:
2018-10-07 07:19:40 +02:00
parent e82296ba06
commit 53d2ce1c0d
8 changed files with 354 additions and 15 deletions

40
docs/Linux/for.md Normal file
View File

@@ -0,0 +1,40 @@
# for
#### 1ere syntaxe:
```bash
bash for variable in liste_valeurs
do instruction(s)
done
```
#### 2eme syntaxe:
```bash
for ((e1;e2;e3))
do instruction(s)
done
```
### Exemples:
Parcourir les arguments passés au script:
```bash
for i in "$@"
do
echo "$i"
done
```
```bash
for ((i=0 ; 10 - $i ; i++))
do echo $i
done
```