Question: is this the right answer 7. Homework Your task is to create a bash shell script that is able to backup all the C# program

is this the right answer  is this the right answer 7. Homework Your task is to
create a bash shell script that is able to backup all the

7. Homework Your task is to create a bash shell script that is able to backup all the C# program files in your current directory, . The algorithm is as follows: Prompt the user to enter a backup directory name, If the backup directory does not exist in the current directory, then create the backup directory For each.cpp file in the current directory . If there have been changes to the file since the last backup or no copy exists in the backup directory, then copy the current cpp file to the backup directory and print a message that the file has been backuped. . Otherwise, no copy will be made, and print a message that the file is the latest CSE 4600 Homework I Shell Programming Deliverables: 1. The code of bash shell script hwl.txt. The shell script file should be hwl sh, but sh files can not uploaded to Blackboard, please revise the extension as txt and then upload it to Blackboard, 2. The script log file hwilog.txt showing the test cases outlined below #!bin/bash echo "enter directory name to backup" read dirname echo " enter directory name id $dirname" fi FILES=*.cpp for file in $FILES do found=' find . -type f-name "dirname/$file" print' if [-z "$found" ]; then echo "Not found, Backingup file file... here" cp $file dirname/ echo "Backedup $file file..." else echo "Found the file" if ["$file" -nt "$dirname/$file"] then printf '%s' "$file is newer tahn backedup file" echo "Backingup $file file...her" cp $file $dirname/ echo "Backingup file file..." fi fi found= 'find. -type d name "dirname" -print' if ( -z "$found"]; then echo "Notfound, so we can create the directory here" mkdir dirname else echo "found the directory" fi

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!