I have an input file "B", containing line numbers referring to specific lines in file "A". I need to search for a text pattern using the line numbers in "B", e.g. first 3 lines of B will be:
385
527
547
So I need to check whether the "pattern" is present between 386 and 526,
528 and 548 in the file "A". I can do this with some complex programming
and looping with the help of awk
etc., but I want to know the built-in
tools and options available in Unix (Solaris) for searching, to make my
code simple, e.g., if there is a tool or option to search a pattern
between a given line range it will be useful.