mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 21:07:00 +00:00
add to "time"
- sleep a random duration Signed-off-by: bonnie <nim.1111.ou@gmail.com>
This commit is contained in:
parent
4d017c2d4d
commit
94defb0184
@ -1076,6 +1076,9 @@ time echo hi
|
|||||||
##### Wait for some time (e.g 10s)
|
##### Wait for some time (e.g 10s)
|
||||||
```bash
|
```bash
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
|
# wait for random duration (e.g. sleep 1-5 second, like adding a jitter)
|
||||||
|
sleep $[ ( $RANDOM % 5 ) + 1 ]
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Log out your account after a certain period of time (e.g 10 seconds)
|
##### Log out your account after a certain period of time (e.g 10 seconds)
|
||||||
@ -2779,11 +2782,6 @@ clear
|
|||||||
# or simply Ctrl+l
|
# or simply Ctrl+l
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Sleep awhile or wait for a moment or schedule a job
|
|
||||||
```bash
|
|
||||||
sleep 5;echo hi
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Backup with rsync
|
##### Backup with rsync
|
||||||
```bash
|
```bash
|
||||||
rsync -av filename filename.bak
|
rsync -av filename filename.bak
|
||||||
|
Loading…
Reference in New Issue
Block a user