How to print a list of strings in awk?

I tried:

for i in {001..224}
do
    awk '{print "her00"$i}'
done

The desired result is her and the number consisting of 5 digits in a file.

her00001
her00002
....
her00010
....
her00200
....


Read more here: https://stackoverflow.com/questions/67213819/how-to-print-a-list-of-strings-in-awk

Content Attribution

This content was originally published by Elena Greg at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: