Hii i have a text file having 3 column
2.0 44.8 789.3
3.0 58.4 453.0
4.0 97.2 -489.1
5.2 35.3 458.6
i want to select the columns from the above text file and want to append the selected column in another text file .The file where i want to append the above columns are given below
> > > >
10.0 8.5
20.0 8.5
30.0 8.5
40.0 8.5
> > > >
10.0 8.0
20.0 8.0
30.0 8.0
40.0 8.0
> > > >
10.0 9.0
20.0 9.0
30.0 9.0
40.0 9.0
> > > >
and my expected output is
> > > >
10.0 8.5 2.0
20.0 8.5 3.0
30.0 8.5 4.0
40.0 8.5 5.2
> > > >
10.0 8.0 44.8
20.0 8.0 58.4
30.0 8.0 97.2
40.0 8.0 35.3
> > > >
10.0 9.0 789.3
20.0 9.0 453.0
30.0 9.0 -489.1
40.0 9.0 458.6
> > > >
i tried the script but after that not getting more idea, i need experts help.Thanks in advance.
#!/bin/sh
for file in inp.txt
do
awk '{print $1}' > colone
done