Improve notice of running commands as single expression in last post

This commit is contained in:
timvisee 2021-03-03 00:30:00 +01:00
parent c447bf8bb8
commit 08bb9828ec
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172
1 changed files with 3 additions and 2 deletions

View File

@ -152,10 +152,11 @@ commands after all.
Bash also has `[[`, which is
[different](https://stackoverflow.com/q/13542832/1000145) from `[`.
You can execute blocks of commands by wrapping it with `{ expr }`. For example:
You can wrap multiple commands with `{ expr }` to run it as single expression in
your command chain. For example:
```bash
[ $EUID -ne 0 ] && { echo You must be root; exit 1 }
[ $EUID -ne 0 ] && { echo You must be root; exit 1 }
```
The `true` and `false` commands do nothing more than returning `0` or `1`.