subject

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. Deliverables: 1. The code of bash shell script hw1.txt. The shell script file should be hw1.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 hw1log. txt showing the test cases outlined below Test Cases captured in hw1log. txt : 1. Start by removing your backup directory (rm -r backup) 2. Ensure that there are some .cpp files in the current directory
3. Show the directory using ls -l
4. Run the backup script file hw1.sh several times as specified below: Type "backup", to create a backup directory ls -l backup Run your backup script file hw1.sh ls -l backup Append to all the files and rerun your backup script file hw1.sh an good way to append is to type: echo "something" >> file. cpp Append to one file and rerun your backup script file hw1.sh

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
To display data in a certain manner like alphabetical order is called
Answers: 1
question
Computers and Technology, 22.06.2019 07:50
In this lab, you complete a prewritten c++ program for a carpenter who creates personalized house signs. the program is supposed to compute the price of any sign a customer orders, based on the following facts: the charge for all signs is a minimum of $35.00. the first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. if the sign is made of oak, add $20.00. no charge is added for pine. black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering. instructions ensure the file named housesign.cppis open in the code editor. you need to declare variables for the following, and initialize them where specified: a variable for the cost of the sign initialized to 0.00 (charge). a variable for the number of characters initialized to 8 (numchars). a variable for the color of the characters initialized to "gold" (color). a variable for the wood type initialized to "oak" (woodtype). write the rest of the program using assignment statements and ifstatements as appropriate. the output statements are written for you. execute the program by clicking the run button. your output should be: the charge for this sign is $82. this is the code, // housesign.cpp - this program calculates prices for custom made signs. #include #include using namespace std; int main() { // this is the work done in the housekeeping() function // declare and initialize variables here // charge for this sign // color of characters in sign // number of characters in sign // type of wood // this is the work done in the detailloop() function // write assignment and if statements here // this is the work done in the endofjob() function // output charge for this sign cout < < "the charge for this sign is $" < < charge < < endl; return(0); }
Answers: 1
question
Computers and Technology, 22.06.2019 10:20
Print "usernum1 is negative." if usernum1 is less than 0. end with newline. convert usernum2 to 0 if usernum2 is greater than 10. otherwise, print "usernum2 is less than or equal to 10.". end with newline
Answers: 3
question
Computers and Technology, 22.06.2019 10:30
You are almost finished updating a web site. as part of the update, you have converted all pages from html 4.0 to html5. the project is currently on schedule. however, your project manager has been asked by the marketing team manager to justify a day of time spent validating the site's html5 pages. the marketing team manager does not have technical knowledge of the internet or the web. which is the most appropriate explanation to provide to the marketing team manager?
Answers: 1
You know the right answer?
Your task is to create a bash shell script that is able to backup all the C++ program files in your...
Questions
question
Mathematics, 04.02.2020 06:53
question
Mathematics, 04.02.2020 06:53
Questions on the website: 13722362