1

I haven't been able to find a helpful answer, so I thought I'd try the experts. I have a rather long list of names; at least 400. I made a number list with crunch that goes from 00 - 99. I need to append each name on my list with each number from the crunch list. As a short example:

Name list:

Anne
Barbara

What I want to get is:

Anne00
Anne01

through

Anne99
...

Barbara00
Barbara01

through

Barbara99

I vaguely remember there being a command to do this, but I can't for the life of me remember what it is. Any help would be greatly appreciated.

0

Awk solution:

awk '{ for (i=0; i<100; i++) printf "%s%.2d\n", $0, i }' names_list
0
while read name; do for i in {00..99}; do echo ${name}${i}; done; done < name_list.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.