i have two input files like this
a 1 b 2 c 3 d 4
a a b c c c d d
how can i create a shell script to have the following output
a 1 a 1 b 2 c 3 c 3 c 3 d 4 d 4
I have tried the paste method and that will only paste the corresponding numbers in order not matching the alphabet. any kinda guidance is appreciated.