mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
Time
- Print date in %Y-%m-%d
This commit is contained in:
parent
de26eeae47
commit
5f04d6349c
@ -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 ]
|
||||||
|
Loading…
Reference in New Issue
Block a user