update manuscript

This commit is contained in:
Dylan Araps
2018-06-20 16:16:53 +10:00
parent 3682bebb17
commit 7d7c2063bb
4 changed files with 4 additions and 9 deletions

View File

@@ -113,10 +113,7 @@ f()for i in "$@"; do echo "$i"; done
## Simpler `case` statement to set variable
We can use the `:` builtin to avoid repeating `variable=` in a case
statement. The `$_` variable stores the last argument of the last
successful command. `:` always succeeds so we can abuse it to store the
variable value.
The `:` built-in can be used to avoid repeating `variable=` in a case statement. The `$_` variable stores the last argument of the last command. `:` always succeeds so it can be used to store the variable value.
```shell
# Modified snippet from Neofetch.