Question: WRITE A BASH SCRIPT Write a script named fileInfo.sh to present a user information about the given file or directory. Include the following into your
WRITE A BASH SCRIPT
Write a script named fileInfo.sh to present a user information about the given file or directory. Include the following into your script and show in the output: (a) if a file or directory exists, say so; if not, exit with a non-zero status; (c) inform the user if the file is a regular file, a directory or a special file. Perform all the above operations in a function. Make calls to the function using a loop on the list of files specified as positional parameters. If the user does not specify any parameter, print the usage line and exit with non-zero status. Your script should demonstrate that you have investigated all possible situations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
