vault backup: 2024-05-30 18:10:46
This commit is contained in:
parent
5e9179d9ff
commit
4016bb9725
@ -39,9 +39,9 @@ Note that the if statement is terminated by `fi`. This is fairly standard throug
|
|||||||
You can also make use of `else` for more complex conditional logic:
|
You can also make use of `else` for more complex conditional logic:
|
||||||
```
|
```
|
||||||
if somecommand; then
|
if somecommand; then
|
||||||
# If the command succeed
|
# If the command succeeds, run this code
|
||||||
else
|
else
|
||||||
echo root is missing from the password file
|
# If the command fails, run this code.
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -50,4 +50,4 @@ fi
|
|||||||
| ----------------- | ---------------------------------------------------------------------------------------------- |
|
| ----------------- | ---------------------------------------------------------------------------------------------- |
|
||||||
| `exit [CODE]` | Make the script process exit, where `[CODE]` is the exit code the process will terminate with. |
|
| `exit [CODE]` | Make the script process exit, where `[CODE]` is the exit code the process will terminate with. |
|
||||||
| `read [VARIABLE]` | Read user input into the provided variable. |
|
| `read [VARIABLE]` | Read user input into the provided variable. |
|
||||||
| | |
|
| `test CONDITION]` | |
|
||||||
|
Loading…
Reference in New Issue
Block a user