[wellylug] more basics / sorting files
E.Chalaron
e.chalaron at xtra.co.nz
Thu Dec 23 16:28:07 NZDT 2004
Hi there
I have a rather simple question.
I have 2 files,
one (A) contains on each line a word
the second (B) contains several data per line including the word in A.
I need to make files C from data (B) containing (A), e.g. grouping every ref
number of a sample into one file then next sample ref et caetera...
I have more than 10000 lines to do and ref numbers are just a pain to sort by
hand ...
I was thinking of something like :
more file_B.txt | grep -i data_in_A > data_in_A_sorted.txt
I think my problem is feed the value data_in_A automatically
I dont really know where to go after this simple grep thing, not being too
keen for a one off for a MySQL solution
Any idea ? awk maybe ?
Thanks a lot and merry Xmas
E
More information about the wellylug
mailing list