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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started