Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rewrite Project 2 so that instead of checking an individual file the user specifies the program checks an entire directory. As the program tests each

Rewrite Project 2 so that instead of checking an individual file the user specifies the program checks an entire directory. As the program tests each file, it should both print the results to the screen and simultaneously to a file called Filetypes_in_. The program should use a loop so that after each run, the user is prompted again for a directory name to process, or can enter Q or q to quit. Constraints: The program must successfully detect whether the value entered is a directory -- and process it -- or another type of file. If the value entered is not a directory the user should be informed.

Project 2 below is already solved in

Write a bash script that prompts the user for the name of a file or directory and then tests the input as to whether it exists or not. If the input name exists, report (print to the console) what type of object it is: regular file, directory, or another kind -- for example a symbolic link. Next, add the ability to input test values via the command line in lieu of reading user input via the read command. Note: this is not "either or". Your script should handle both and act accordingly, i.e., if the user executes your script by typing

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

Pro Android Graphics

Authors: Wallace Jackson

1st Edition

1430257857, 978-1430257851

More Books

Students also viewed these Programming questions

Question

Compare and contrast licensing and subcontracting.

Answered: 1 week ago