docs: update

This commit is contained in:
Dylan Araps 2018-06-14 08:28:01 +10:00
parent 778951cecf
commit 3391d5dcb3
1 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,7 @@ scripts and not full blown utilities.
* [Get the current cursor position.](#get-the-current-cursor-position)
* [Code Golf](#code-golf)
* [Shorter `for` loop syntax.](#shorter-for-loop-syntax)
* [Shorter infinite loops.](#shorter-infinite-loops)
* [Shorter function declaration.](#shorter-function-declaration)
* [Miscellaneous](#miscellaneous)
* [Get the current date using `strftime`.](#get-the-current-date-using-strftime)
@ -441,6 +442,16 @@ for i in {1..10}; do echo "$i"; done
for((i=0;i<=10;i++)); do echo "$i"; done
```
### Shorter infinite loops.
```sh
# Normal method
while :; do code; done
# Shorter
for((;;)){ code;}
```
### Shorter function declaration.
```sh