aliahsan81
December 10th, 2010, 11:59 AM
Hi All
I have file xxxx.txt i want to read file column by column in bash loop up till now i have done
##### merge two file by column
paste file1 file2 > xxxx.txt
for i in ` cat $xxxx.txt `
do
#echo $i
live=$(echo $i | awk -F " " '{print $1}')
home=$(echo $i | awk -F " " '{print $2}')
echo $live
done
but its not working as i suppose.Can any one help me out
file formate is
AAAAAAAAA BBBBBBBB
CCCCCCCCC DDDDDDDDD
I have file xxxx.txt i want to read file column by column in bash loop up till now i have done
##### merge two file by column
paste file1 file2 > xxxx.txt
for i in ` cat $xxxx.txt `
do
#echo $i
live=$(echo $i | awk -F " " '{print $1}')
home=$(echo $i | awk -F " " '{print $2}')
echo $live
done
but its not working as i suppose.Can any one help me out
file formate is
AAAAAAAAA BBBBBBBB
CCCCCCCCC DDDDDDDDD