Shell script problem

I have two files.

file 1 content is

jerry 123
tom 456
shrek 789

file 2 contents is

a@hotmail.com
b@hotmail.com
c@hotmail.com
d@hotmail.com
e@hotmail.com
f@hotmail.com

Now, i want output this format

jerry 123 a@hotmail.com
jerry 123 b@hotmail.com
tom  456 c@hotmail.com
tom  456 d@hotmail.com
sherk 789 e@hotmail.com
sherk 789 f@hotmail.com

Please,help me thank a lot .

Hi, try:

awk 'NR%2{getline p<f}{print p OFS $1}' f=file1 file2
1 Like

thanks Scrutinizer , good reasoning.