If number afte sp in first file "Q676U5" matches with the first number after AC in second file "Q676U5"
it should check for second file
"variant" and the number after this if lies within
the numeric range mentioned in first file after
@ 91- 118 @ 154- 190
then expected output should be accordingly that
because number after variant in second file 300 and 307 do not lie in the range of @ 91- 118 @ 154- 190
so expected output is No after the matched first number.
In the same way we can match entries with other number and put the yes or no if the number after variant in second file lies in range afte@in fist files.
With over 150 posts, I would expect that you have some idea of how to do this. What have you tried so far?
Your specification of how to determine whether an entry in file1 matches an entry in file2 is very weak. Please clarify the requirements by answering all of the following questions:
Does the first line of an entry in file1 always start with <space>sp?
If not, what else can come before the sp besides a <space> character?
Does the first line in an entry in file1 always use | as the field separator?
Do any other lines in an entry in file1 contain an | character?
Is [sp] in file1 always lowercase letters?
How do we find the ranges to be checked?
How do we recognize that a range is present?
Are lines with ranges the only lines in file1 that contain the @ character?
Does the line that contains the ranges always start with Coil in column 1 (uppercase C and lowercase oil)?
Are there always exactly two ranges to be matched against?
Do ranges always immediately follow an @ character?
What constitutes a successful match on the ranges?
Does just one variant have to match any of the given ranges, or does each variant have to match one of the ranges?
Does the 1st variant have to fall within the 1st range, the 2nd variant have to fall with the 2nd range, etc.?
Will there always be the same number of variants as there are ranges in matched records in file1 and file2?
In file2, is a 2nd contiguous line starting with AC a continuation of the previous line, or is it a separate AC instance? (I.e.I if the 1st line in file1 had been: sp|Q96JV5|A16L1_HUMAN, instead of: sp|Q676U5|A16L1_HUMAN, should it have still matched the same entry in file2?)
In file2, is VARIANT case sensitive?
In file2, will VARIANT only appear on a line starting with FT?
In file1 is there any separator between entries?
In file2 is there any separator between entries?
Approximately how large are file1 and file2?
Last edited by Don Cragun; 09-23-2012 at 03:18 PM..
Reason: trying to fix a list formatting problem
Hi All,
This might be a basic question... I need to write a script to find all/any Speacial/Null/Control Chars and Print Line Numbers from an input file.
Output something like
Null Characters in File Name at : Line Numbers
Line = Print the line
Control Characters in File Name at : Line... (2 Replies)
Hi Unix Gurus,
I have a long text file, where alarms events are logged and alarm clear event are logged.
Both events alarm and alarm clear has common identifier as{xxxxxxxxxx}
I need to analyse the time-period for which the alarm sustained.
i.e
Output: timestamp from both event has... (3 Replies)
I've got two files that each contain a 16-digit number in positions 1-16. The first file has 63,120 entries all sorted numerically. The second file has 142,479 entries, also sorted numerically.
I want to read through each file and output the entries that appear in both. So far I've had no... (13 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am trying to convert a C language program over to Sparc Assembley and I am getting Undefined first referenced... (4 Replies)
Hi,
I would like to know how to solve one of my problems using expert unix commands.
I have a file with occasional blank lines;
for example;
dertu
frthu
fghtu
frtty
frtgy
frgtui
frgtu
ghrye
frhutp
frjuf
I need to edit the file so that the file looks like this; (10 Replies)