1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Inessa [10]
4 years ago
10

Your task is to create a bash shell script that is able to backup all the C++ program files in your current directory. The algor

ithm 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
Computers and Technology
1 answer:
Oliga [24]4 years ago
7 0

Answer:

backup() {

 read dirname;

 if [[ whereis . /`$dirname` 2>  sterr.exe]]  

    then

        mkdir  $dirname

 for f in . / *.cpp

 do

    cp f "path_to_dirname"

    echo "file backup complete"

}

backup( )

Explanation:

The bash script above is used to backup C++ source files in a directory to a backup directory which is created if it does not exist, and copy's each .cpp file to backup, then sends a message to declare its completion.

You might be interested in
When responding to an incident in which explosive materials are suspected, is it safe to use wireless communication devices?
Nataly [62]

Answer:

No

Explanation:

Wireless communication devices like the cell phones transmits signals using radio or electromagnetic wave, which would trigger a bomb. An example of this kind of bomb is the home-made bomb also known as IED (improved explosive device).

The most common type of this IED is the radio controlled IED, which uses electromagnetic wave from a cell phone or a radio controlled type firing circuit. Insurgents, criminals etc, make use of such devices, since the materials are easy to get and are affordable.

8 0
3 years ago
An objective function in linearprogramming is a(n):
bixtya [17]

Answer: An objective function in linear programming is a decision variable.

Explanation: An objective function is a function which has the target towards the model whether it should be maximized or minimized according to the relation between the  variables present in the function. There are set of variables which are responsible for the controlling of objective function that is known as decision variables.

4 0
3 years ago
A network administrator is implementing multifactor authentication for employees who travel and use company devices remotely by
devlian [24]

Answer:

A networking administrator is a multi-factor authentication for employees who use company devices by using a VPN. The level of authentication is 802.1X and OTP.

Explanation:

Network administration is the computer network and uses multiple computers. A company and organization uses multiple computers and need a network admin to connect with a different system. Network administrators depend upon the organization. Some duties of the network administration are split and clearly defined such as

Configure the network hardware, servers, and routers

Upgrade the computer networks

Troubleshooting network issues

Assigning the network models

Deploying the software

Managing the servers

Implementing the security and measure

Network administration requires technical competence and will benefit as a network administrator.

For the level of authentication 802.1, X and OTP are suitable for network administration.

5 0
4 years ago
When a user inserts a PivotTable, where will it be inserted?
Alexeev081 [22]

Answer:

depends on whether the Pivot Table is inserted into the current worksheet or a new worksheet and the current location of the cursor.

Explanation:

Pivot tables are short tables with few columns and rows out of the original set of rows and columns. And they are being governed by the report filter, and column labels can also be added, as well as rules can be applied to value, but for formulas, we need to create the formula field. However, it can be placed in the current worksheet or a new worksheet and the current location of the cursor.

3 0
3 years ago
01110111 01101000 01100001 01110100 00100000 01101001 01110011 00100000 00110001 00101011 00110001
Lera25 [3.4K]
Same lol thesis so me right now
7 0
4 years ago
Other questions:
  • What was the treaty of the Meter
    13·1 answer
  • If you choose a career, you will always be satisfied with your work.<br> True<br> False
    7·2 answers
  • Which AWS service is a managed service that makes it easy to set up, operate, and scale a relational database in the cloud?​
    9·1 answer
  • Write a short program that uses a for loop to write the numbers 1 through 10 to a file
    11·1 answer
  • which internet technology allows businesses to make presentation and share visual aids such as charts and graphs
    14·2 answers
  • Which of these programmers creates the core game engine?
    5·2 answers
  • A medium format camera has a large image sensor what benefit will a large sensor have for resulting images. PICK MORE THAN ONE.
    7·1 answer
  • How to write conclusion of hard disk​
    11·1 answer
  • Line charts are best used for
    15·2 answers
  • Which of the following is NOT a media file? *<br> .wav<br> .mp4<br> .exe
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!