Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions