add commands in 'Other'

Repeat printing string n times
This commit is contained in:
Bonnie I-Man Ng 2019-09-06 18:08:52 +08:00 committed by GitHub
parent b6997413d3
commit e24959113a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2182,6 +2182,11 @@ hostnamectl set-hostname "mynode"
## Others ## Others
[[back to top](#handy-bash-one-liners)] [[back to top](#handy-bash-one-liners)]
##### Repeat printing string n times (e.g. print 'hello world' five times)
```bash
printf 'hello world\n%.0s' {1..5}
```
##### Encode strings as Base64 strings ##### Encode strings as Base64 strings
```bash ```bash
echo test|base64 echo test|base64