although I tried doing like this
, but it require me to type both the variable to a file under different column
i/p
cat pqr
1 a
2 b
3 c
4 d
5 e
cat sample_twovari
for i in `cat pqr | awk {'print $1'}`
do
j=`grep $i pqr | awk {'print $2'}`
echo " I Love $i and $j"
done
o/p
I Love 1 and a
I Love 2 and b
I Love 3 and c
I Love 4 and d
I Love 5 and e