mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
Time
- Print date with formatting
This commit is contained in:
parent
8e6a0f8eb9
commit
3d6f8bcda1
@ -1089,10 +1089,14 @@ time echo hi
|
|||||||
sleep 10
|
sleep 10
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Print date in %Y-%m-%d
|
##### Print date with formatting
|
||||||
```bash
|
```bash
|
||||||
date +%F
|
date +%F
|
||||||
# 2020-07-19
|
# 2020-07-19
|
||||||
|
|
||||||
|
# or
|
||||||
|
date +'%d-%b-%Y-%H:%M:%S'
|
||||||
|
#10-Apr-2020-21:54:40
|
||||||
```
|
```
|
||||||
|
|
||||||
# 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user