mirror of
				https://github.com/onceupon/Bash-Oneliner.git
				synced 2025-11-03 22:51:07 +01:00 
			
		
		
		
	add to "time"
- sleep a random duration Signed-off-by: bonnie <nim.1111.ou@gmail.com>
This commit is contained in:
		@@ -1076,6 +1076,9 @@ time echo hi
 | 
			
		||||
##### Wait for some time (e.g 10s)
 | 
			
		||||
```bash
 | 
			
		||||
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)
 | 
			
		||||
@@ -2779,11 +2782,6 @@ clear
 | 
			
		||||
# or simply Ctrl+l
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
##### Sleep awhile or wait for a moment or schedule a job
 | 
			
		||||
```bash
 | 
			
		||||
sleep 5;echo hi
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
##### Backup with rsync
 | 
			
		||||
```bash
 | 
			
		||||
rsync -av filename filename.bak
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user