|
Hi,
thanks for the reply. It works fine when pattern1 and pattern2 are totally different. In some cases, pattern2 will be a part of pattern1 and in this case, it will just print the pattern1 and exits. how can we avoid this ?
Also, pattern2 can occur ( multiple times ) before pattern1 itself since it can pair up with other patterns to form a different range. so, how can we modify the command so that "-e '/pattern2/q' " part is effective only if the search is in the range ?
thanks again,
sank.
|