Question: Write a shell script which: 1. accepts a file name 2. checks if file exists 3. if file exists, copy the file to the
Write a shell script which: 1. accepts a file name 2. checks if file exists 3. if file exists, copy the file to the same name + .bak + the current date (if the backup file already exists ask if you want to replace it). 4. ask the user if she/he want to backup another file When done you should have the original file and one with a .bak at the end. What to submit? Upload your code and the following screenshots: 1. What happens when the file name does not exist? 2. What happens when the file exists and user wants to backup the file, and a previous backup file does not exist? 3. What happens when the file exists and a previous backup exists?
Step by Step Solution
There are 3 Steps involved in it
Here is a shell script that performs the tasks described bash binbash Function to check if user want... View full answer
Get step-by-step solutions from verified subject matter experts
