Question: Write a Bash script that receives a single argument, corresponding to a file name. The program will then print the following information to the standard

 Write a Bash script that receives a single argument, corresponding to

Write a Bash script that receives a single argument, corresponding to a file name. The program will then print the following information to the standard output (print all lines that apply in this order), replacing xxx with the file name: - If the file does not exist, prints: xxx DOES NOT EXIST. - If the file is a symbolic link, prints: XXx IS A SYMBOLIC LINK. - If the file is a regular file, prints: XXX IS A REGULAR FILE. - If the file is a directory, prints: XXX IS A DIRECTORY. - If the file exists and is empty, prints: xxx IS EMPTY. - If the current user has permission to read the file, prints: I CAN READ XXX. - If the current user has permission to modify the file, prints: I CAN MODIFY XXX. - If the current user has permission to execute the file, prints: I CAN EXECUTE XXX

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!