By nikhil jain
Code:
Al,1
Ail,13
Al,3
Al,1
Al,3
Al,2
Al,3
Al,1
Al,1
Al,1
My requirement is i wanted only the second column of every file as a column ony in the base file… I used paste command… but it is not helping as I’m using while condition.
Code:
while read dline
do
while read opline
do
grep $dline Combo_31Jan.csv|grep -i "$opline" |awk -F, '{print $1","$7}'>>combo_operncount.$dline.$opline
done < operator.txt
done < date.txt
while read dline
do
>blank.$dline
while read opline
do
#paste blank.$dline combo_operncount.$dline.$opline >> FC7DFILE.$opline
#mv FC7DFILE.$opline blank.$dline
done < operator.txt
done < date.txt
operator.txt and date.txt contains
…read more
Source: FULL ARTICLE at The UNIX and Linux Forums