Question: Using Bash: In a learning environment, it's not uncommon to wind up crowded directories filled with a number of files for testing, empty files, and
Using Bash:
In a learning environment, it's not uncommon to wind up crowded directories filled with a number of files for testing, empty files, and even empty directories. In this project, it is your task to create a command line interface that will continually prompt a user to see if they would like to:
List the files in the current directory
Provide a directory name and then a series of filenames to moved into their own directory.
Provide a name for a tar file, then a method of compression and then a series of filenames to be combined via tar.
Navigate to another directory specified by the user.
Search and list all empty files and directories within the working directory.
Exit the program
In some situations, your program should provide an error message:
If a user provides a file or directory name that does not exist, prompt the user with an error message and reprompt the user for the proper file names. It should also log an error message by appending to a file "logerr.txt" an appropriate message.
Your script should terminate with an error message if one of the inputs given to it contains a semicolon or a | symbol. It should also log an error message by appending to a file "logerr.txt" an appropriate message.
Implement your menu and have it take selections but do nothing else.
Have your script execute options 1, 4 and 6 (the easier ones I would say)
Add error checking for a file or directory that does not exist, put that error in the log
Add error checking for ; or | in input, put that error in the log
Implement option 2 and 3
Implement option 5.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
