Strings In Depth14 / 17
Up next

Repeat a string

#!/usr/bin/env bash
# printf pads to width 10, then tr fills the spaces with '='
line=$(printf '%*s' 10 '' | tr ' ' '=')
echo "$line"
What you're solving

printf and tr build a repeated string