title: Text Processing...print the 1st occurrence of pattern1 and 8th and 9th occurrence of pattern 2
body: <p>I have a text file and I want to print the 1st line starting with pattern "abcd" and also the 8th and 9th lines which are started with "DDD" pattern. Any sed or awk for doing that?</p>