06-08-20121

This commit is contained in:
2021-08-06 13:32:29 +02:00
parent 53aa196ac1
commit 7d89fb0224
14 changed files with 2297 additions and 46 deletions

View File

@@ -119,7 +119,7 @@ $ usermod -G "" <username>
### Code de sortie:
### Code de sortie (code de retour):
Chaque commande renvoie un *code de sortie* (quelque fois nommé *état de retour* ).
@@ -136,6 +136,7 @@ $ hostname
silverbook.home
$ echo $?
0
$ hostnam
-bash: hostnam: command not found
$ echo $?
@@ -149,3 +150,18 @@ bruno@SilverBook:~/.kymsu/plugins.d$ if [ $? -eq 0 ]; then echo "ok"; else echo
ok
```
```bash
$ pip3 install -U "pip"
ret=$?
# pas d'update: ret=0
[ $ret -eq 0 ] && echo -e "No update available !"
if [ $ret -eq 0 ]; then
echo -e "No update available !"
fi
```