Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unix question. How do I perform the following commands? TASK 1: Display all lines in famous.dat that end in 0 or 1, and have a

Unix question.

How do I perform the following commands?

TASK 1:

Display all lines in famous.dat that end in 0 or 1, and have a 1 in the 3rd from the last column. For example lines ending in 120 and 131 would be displayed.

TASK 2:

Create a one-line command, using he famous.dat file, to add the word " STREET" to the address, for all who live on 2nd or 3rd. For example: '2nd' becomes "2nd STREET" and '3rd' becomes "3rd STREET". Display only the first 9 lines.

Hint: use 2 sed statements with pipes.

Task 3

Display all lines in famous.dat that have only 4, 5, 6, 7 and 9 in the zip code. HINT: this is the same as NOT 0,1,2,3 or 8.

Task 4

Using only the grep command, search all files with names that end in either .html or .htm under the $HOME/public_html directory and display any lines that contain body tags (containing ''). No other output should be displayed even if there is no public_html directory. Hint: use two command arguments and 2>

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions