Article 5MTX8 Generate a 0 padded sequence with a string prefix

Generate a 0 padded sequence with a string prefix

by
iicapn
from LinuxQuestions.org on (#5MTX8)
I'm trying to generate a list of values like this:
Hi000
Hi001
Hi002
..
Hi999

My bash code currently looks like this:
Code:prefix=Hi
number=1000
for i in {1..$number}; do
# n=$(seq -f "%03g" 0 $number_keys)
n=$(seq -w 0 $number)
echo $prefix$n
((n=n+1))
done(the commented out line is something I tried but failed at)

The result (using number=10) is:
Code:./test.sh: line 10: ((: 00
01
02
03
04
05
06
07
08
09
10: syntax error in expression (error token is "01
02
03
04
05
06
07
08
09
10")I've tried a lot of things but can't quite put my finger on it... Thank you all in advance. :-)latest?d=yIl2AUoC8zA latest?i=rNCF6AVVGyU:GrB75te_MNQ:F7zBnMy latest?i=rNCF6AVVGyU:GrB75te_MNQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=rNCF6AVVGyU:GrB75te_MNQ:gIN9vFwrNCF6AVVGyU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments