« Back to Index

Shell: Repeat a single character N times

View original Gist on GitHub

Tags: #bash #shell #repeat

Repeat a single character N times.bash

# repeat the character x twenty times
printf 'x%.0s' {1..20}