Question: Please write a shell script called checkFile that checks a file provided from the command line by a user to determine whether it is a

 Please write a shell script called "checkFile" that checks a file

Please write a shell script called "checkFile" that checks a file provided from the command line by a user to determine whether it is a regular file or a directory. If it is a regular file, your script should go further to determine whether it is readable? Your script should display the information on each checking step it makes, such as "This file is a regular file" or "This file is a readable file," or "This file is a directory," etc. In other words, the script should be executed in a way that is similar to the following one (assuming that "checkFile" is created under your labs directory): $ ./checkFile my 3 The Input File: my 3 my3 is a regular file. my3 is readable. See you next time! $ $ mkdir mydir3 $ ./checkfile mydir3 The Input File: mydir mydir is a directory. See you next time! Please test your script to make sure it displays the information as required: Please provide a screenshot of the execution of your script and explain whether it meets the requirements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!