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]
3 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]3 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 used to temporarily hold small units of program instructions and data immediately before, during, and after execution b
Mazyrski [523]

Answer: A register

Explanation:

Registers are small memory used to store data or values and supply them to the processor as and when needed. These register hold the data temporarily and hold small units of program instructions. So whenever the CPU wants to work on data they have to be made available through the registers. Even after a arithmetic operation the registers serve as buckets for holding the value.

There are different types of registers such as register A, B, C etc and these registers lie in close proximity to the CPU so that we could provide the data immediately and much faster when asked by the CPU.

Therefore we can say that registers are used to temporarily hold small units of program instructions and data immediately before, during, and after execution by the central processing unit (CPU).

8 0
4 years ago
EIPP:________.
nikdorinn [45]

Answer:

D. All of these choices are correct

Explanation:

Electronic invoice presentment and payment, otherwise known as EIPP are business-to-business systems that combine e-invoicing and e-payment processes for the purpose of sending invoices to customers via Web portal or via a secure network by the use of a third party service provider. They are also used for receiving payer-initiated, third-party-processed, and ACH-network-settled wire transfers.

4 0
3 years ago
Read 2 more answers
The homepage is the page your browser displays when you first start the program
soldi70 [24.7K]
Home page usually refers to the page that initially displays if you type in http://www.example.com/  It's usally named index.html, index.shtml or the like.
3 0
3 years ago
In the late 1980s, which wide area network (wan) technology became one of the standard methods of connecting business computers
Paha777 [63]
Frame i think, thats what i learned about
7 0
3 years ago
Which girl is he baddest 1. Shawty 2.Lisa 3.Ashley
Ainat [17]

Answer:

. . . . . . . S H A W T Y.. . .. . .

3 0
3 years ago
Other questions:
  • Why is peer answer always not working? just wondering idk why
    7·2 answers
  • What economic measure is at the highest level since the Great Depression?
    12·1 answer
  • Name the functional arms of MSDE.
    13·1 answer
  • Which of the following is an example of a content management system (CMS)?
    12·2 answers
  • 5 negative impacts of digital life Explain
    9·1 answer
  • Favorite color should it be stored why?or why not?<br>​
    6·1 answer
  • Write a program to generate the 1,8,27,64,125,226,343,512,729,1000 series.​
    12·1 answer
  • Is it a way to get robuc 4 free
    6·2 answers
  • Which of the following rules need to be followed when using variables?<br> Choose all that apply.
    9·2 answers
  • What does the word collaborative mean?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!