i have a file a which contains some thing like this
strand smthg position
+ yyx 3020
yyw 10,000
now i have another file (file2) which contains the data starting from 1 to n positions
i want to refer first file if + appears it should go to eg 3020 position in file 2 and see for a pattern match say $abc at 250 characters after 3020 (i,e., 3270).
if " -" appears it shud go 250 characters before 3020 and search for the pattern $abc.
how can i do it
2nd file has aababbabahhhnjkmlipolmkijnhbu.........................
first it should read the file1 3rd column (10) and check for first column (+) . if it is + it should move 250 characters a head of present position (10) in file 2 and check for a pattern say $abc. am i clear nw?