Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions