Question: Write an awk script named select.awk to select (and copy to standard output) lines of a file that are between lines 7 and 13 (included)

 Write an awk script named select.awk to select (and copy to

Write an awk script named select.awk to select (and copy to standard output) lines of a file that are between lines 7 and 13 (included) of the input file, and o contain the text "needle" somew here in the line All other lines from the input file should be discarded. For example: user$ cat test.txt 2 Lines of this test file are numbered 3 for convenience. In general they won't be 4 5 These lines should be discarded 6 even if they contain a needle 7 First line that counts, with needles 8 haystack 9 haystack 10 another needle 11 lots of needles and more needles 12 haystack 13 last needle that counts 14 Discard from here on, even with needles 15 haystack 16 end of file user$ select.awk test.txt 7 First line that counts, with needles 10 another needle 11 lots of needles and more needles 13 last needle that counts. user$

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!