I have 2 files with around 2k records.. I am lost how to build a script to create another file with the below:confused:
Match Condition1:
File1's 12th Columns data should exact match with File2's 19th Column's data
Match Condition2:
File1's 28th Column's data format is like "RSL N" this must match with File2's 29th Column's data Formant "TRE N".. Match must be in terms of N.. While N is in numbers..
Script must find when the Match condition1 is TRUE AND Match condition2 is FALSE & then create a file with the below format:
You could use Perl to create a hashmap of file 1 indexed on field 12, then, go through file 2 looking at whether field 28 of the relevant hashmap entry matches field 29 of the current record...
You can call Perl within a bash script, just as you can call sed or awk, the example above, using the same quotes could be dropped into a script as a single command. (Though a few comments might be good form
As I said: untested because no sample file available. So the tests are up to you.
And, what do you mean with "...File2 does not contain Column # 19..."? Does it or doesn't it?
And, your request was for "TRE" in col 29, above you post "tre".
To me, it'd be normal and logical that no match is found.