Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In unix - Take three arguments: a directory, a file pattern, and a search string - Look for the search string inside the files determined

In unix

- Take three arguments: a directory, a file pattern, and a search string

- Look for the search string inside the files determined by the directory and the file pattern.

- Print the number of files that contain the pattern

- Print the names of the files that contain the pattenumrn

- Calculate the average words per file in all the .doc files in the directory. The calculation must be to four decimal places.

- Print the average words per file for the .doc files

- Use bc and a here-document to calculate the average word count of the .doc files

- Calculate the average word count to four decimal places

Output should look like

image text in transcribed

Found ?? matches for search-string in dir/file_pattern The files containing matches were: list of file names here There are ?? . doc files in dir The .doc files average ??.???? words per file

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

Step: 3

blur-text-image

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago