Question: In shell scripting, it is possible to test if a file exists using the e option. For example, if the file name is SF

 In shell scripting, it is possible to test if a file

In shell scripting, it is possible to test if a file exists using the " e" option. For example, if the file name is SF then a test such as if-e "SF .. is true if the file exist. 3 2/ It is required to write a shell script that asks the logged user to enter a file name. no such file, the script should display a messag the following: If the file type is executable, change the file permissions to grant the owner an execute and then run the file. If the file type is text, deny both owner and group from the write permission and then view the file contents. If the file type is directory, change its permissions to grant all users both read and execute and then view the directory contents recursively showing the type of each displayed item. For other file type, show the exact e saying that and terminate. If file exist, do type and give the user the choice to delete such file

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!