Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a script that will take an argument a file that has a list of filenames. For each file, print whether the file is a

Write a script that will take an argument a file that has a list of filenames. For each file, print whether the file is a directory, an empty file, or something else. It should have two optional arguments i will ignore empty files, and s will print out a sum of how many files of each type were found. Hint: You can use awk {print $2} to print out the second column of output. Hint: [[ ! ( -f "$file_to_read" ) ]] checks if your file in file_to_read is an actual file Hint: [[ ! ( -e $filename ) ]] checks if a filename exists (true if doesn't) Add error handling quit with error if passed in an invalid file, print out doesnt exist for line that point to files that dont exit, and sum should display how many of the lines werent a 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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

Students also viewed these Databases questions

Question

A relational database is

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago