Repeat a string: Difference between revisions

→‎Using printf: Added REPEAT method.
(→‎Using printf: Added REPEAT method.)
Line 1,581:
}
reprint '% ha \' 5</lang>
 
=== Using repeat ===
{{works with|zsh}}
{{works with|csh}}
 
<lang bash>
len=12; str='='
repeat $len printf "$str"
</lang>
 
===Using head -c===
Anonymous user