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
____ is a special type of large, integrated system that ties together all types of a company’s activities, such as planning, man
Rainbow [258]

Answer:i think is an intranet

Explanation:because that's where they save most of their things

7 0
3 years ago
Read 2 more answers
The technique that allows you to have multiple logical lans operating on the same physical equipment is known as a.
sergiy2304 [10]

Answer:

As far as i know, it is Virtual Local Area Network (VLAN). You can read more about this here: https://en.wikipedia.org/wiki/VLAN

5 0
2 years ago
You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are ap
tiny-mole [99]

Answer:

Option b is correct

Explanation:

For example, setting user config. Per user on a Microsoft computer

Go to config. Setting in the group management policy

Locate admin template, click group policy and enable the loop back policy.

This policy helps the computer to use set of GPO for users who log on to computers affected by this policy and this application is supported only in environment with active directory.

8 0
3 years ago
Read 2 more answers
When does the VB.NET programming environment start to operate?
drek231 [11]

Answer:

B. once a VB.NET project is created in the Microsoft Visual Studio environment.

Explanation:

Visual Basic . Net is a programming language which is used to run complex software and projects. The VB projects which are created in Microsoft Visual Studio are run by console application. These computer applications run complex and technical software.

5 0
4 years ago
How can IT infrastructure be linked to the business strategy of any organization
Anni [7]

Answer:

The overview of the situation is discussed in the following part.

Explanation:

It's indeed real that perhaps IT technology will have a strategic edge and improved market efficiency. IT technology can improve the protection, accessibility, and efficiency of any enterprise.

Numerous massive, small as well as medium-sized companies or beginning are currently preparing their growth plans by sustaining a stable IT infrastructure throughout the place that will ensure and increase their profitability.

<u>Those same years, the accompanying IT infrastructure is being used to connect the market strategy</u>:

  • Broadband and Wireless Connectivity,
  • Security and Risk Management,
  • IT Structure Strategy,
  • Performance Strategy, etc.
7 0
3 years ago
Other questions:
  • Jackson is teaching the decimal number system. He wants his students to know how to expand numbers by powers of 10. Which is the
    13·2 answers
  • Microsoft access does not create n:m relationships because microsoft access creates databases based on
    7·1 answer
  • Which of these computers was marketed as a computer/game machine?
    15·2 answers
  • Carol typed a memo to send to everyone in her department. To create this memo, she used a _____. spreadsheet word processor fax
    10·2 answers
  • True or false.the color attribute cannot recognized the hexadecimal code.
    7·2 answers
  • The main purpose of a service panel in a house is to
    11·1 answer
  • Select the correct answer.
    15·2 answers
  • Always follow the routine "clean up while in use and clean up before keeping it".
    6·1 answer
  • Question #7
    10·2 answers
  • In which number system do the digital computer work​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!