-3

I have devised a way of outputting

Name1
Name2
etc.

To an extent. However with what I already have it only displays "Name" repeatedly without the integer on the end but I think I'm almost there. Can someone help me?

I read an article before about iterations so I am currently using one

#!/bin/bash

NAME="Name"

END="15"
for ((I=1;I<=END;I++))
do
echo ${NAME}
done

I expect the output to be -

Name1
Name2
Name3 ... All the way to Name15

However the actual output is -

Name
Name 
Name

and so on...

Aksen P
  • 4,564
  • 3
  • 14
  • 27

1 Answers1

1
#!/bin/bash
for i in $(seq 1 15)
do
    echo "Name$i"
done
michael
  • 315
  • 2
  • 9