1

I want to use the same way of repeating a character as in the accepted answer to this question.

But instead of repeating it a predetermined number of times, I want to use a variable. What I tried so far:

let a=15
printf "G%.0s" {1..$a}

This doesn't work.

What is the correct way to place a variable inside curly braces for expansion?

Community
  • 1
  • 1
Maxim Mikhaylov
  • 702
  • 11
  • 30

0 Answers0