You can create a function to loop a string for a specific count and use it in the
loop you are executing with dynamic length. FYI a different version of oter answers.
line_break()
{
for i in `seq 0 ${count}`
do
echo -n "########################"
done
}
line_break 10
prints: ################