Quote:
Originally Posted by gauravgoel
hey i forgot one important thing sort the two files before joining them using sort command on field 2 of file 1 and filed1 of file 2.
Otherwise the join will not work properly.
Gaurav
Hi thanks for the syntax about the JOIN command, it worked.
My concern now is about the input file format.
When I joined the two files.
text1
9835023 20051004F2_011
9835021 20060904FAL0132006
8835099 20051004HOL011
8835044 20051004H1_011
6835023 20061002HAL0132006
4835099 20050721F1_011
4835088 20050906F1_011
4835044 20060905FAL0132006
4835023 20061001HAL0132006
4835021 20050816FAL011
3835023 20050707F1_011
2835021 20050531SM2011
text2
20050531SM2011
20050707F1_011
20050721F1_011
20050816FAL011
20050906F1_011
20051004F2_011
20051004H1_011
20051004HOL011
Actually file text1 have format, field1 and field2 suppose to have 20 charaters including the spaces.
X = represents spaces
9835023XXXXXXXXXXXXX20051004F2_011XXXXXX
questions:
1. can the JOIN command consider the spaces set in text1 file?
2. do i have to use some flags for this? Please let me know.
My goal is to have an output like this(below)
X = represents spaces
9835023XXXXXXXXXXXXX20051004F2_011XXXXXX20051004F2_011XXXXXX
thanks for your help
cheers!
--d3ck_tm