- Print date in %Y-%m-%d
This commit is contained in:
bonnie 2020-07-19 20:36:59 +08:00
parent de26eeae47
commit 5f04d6349c

View File

@ -1086,6 +1086,13 @@ time echo hi
##### Wait for some time (e.g 10s) ##### Wait for some time (e.g 10s)
```bash ```bash
sleep 10 sleep 10
```
##### Print date in %Y-%m-%d
```bash
date +%F
# 2020-07-19
```
# wait for random duration (e.g. sleep 1-5 second, like adding a jitter) # wait for random duration (e.g. sleep 1-5 second, like adding a jitter)
sleep $[ ( $RANDOM % 5 ) + 1 ] sleep $[ ( $RANDOM % 5 ) + 1 ]