Your task is to create a tcsh shell script that is able to backup all the C program files in your current directory.
The algorithm is as follows:
• If a backup directory does not exist, then prompt the user if they would like to make one.
• If the user responds "y" or "yes" in either capitals or lowercase, then make the backup directory (in your current working directory)
• If the user responds "n" or "no" in either capitals or lowercase, then produce a message that no directory was created
• otherwise, print a message that an invalid response was entered
• If the backup directory exists
• For each .c file:
• If there have been changes to the file since the last backup, then copy the current .c file to the backup directory
• Else (if no copy exists in the backup directory) copy it
• (Otherwise, no copy will be made)
The following is a shell script that makes backups to a "backup" directory in your home directory: bckup.sh
You might want to take ideas from it, but note that it does not prompt you if you would like to make the directory.