Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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