Anonymous user
Repeat a string: Difference between revisions
→{{header|UNIX Shell}}: Found head -c in GNU Coreutils manual, it must be GNU extension.
(→{{header|UNIX Shell}}: Found head -c in GNU Coreutils manual, it must be GNU extension.) |
|||
Line 856:
eval "printf '${1}%.0s' {1..${2}}"
}</lang>
===Using head -c===
<code>head -c</code> is a [[GNU]] extension, so it only works with those systems. (Also, this script can only repeat a single character.)
{{works with|Bourne Shell}}
|