Questions
UNIX/TERMINAL ASSIGNMENT - DIFFICULT Could you please type line by line what I should be entering...

UNIX/TERMINAL ASSIGNMENT - DIFFICULT

Could you please type line by line what I should be entering in the terminal command line to complete the assignment as instructed?

INSTRUCTIONS AS FOLLOWS:

In this lab you will create a script to backup certain number of oldest or newest files in the current directory into a compressed archived file. The objective of this lab is to familiarize and gain proficiency with the following:

• Use of command line arguments

• Use of conditional statement

• Use of for loops

You need to write a script named backup.sh which will receive 3 command line arguments. The arguments are:


• The 1st argument is the string “old” or “new” indicating whether the oldest files or the newest files needs to be backed up

• The 2nd argument is an integer indicating how many files needs to be backed up.

• The 3rd argument is the name of archive file (tar file).

Your script should perform the following functions

• Check whether 3 arguments have been passed or not.

• If three arguments have not been passed display appropriate message and exit.

• Check whether the 1st argument is not the string “old” or “new” display appropriate message and exit.

• Create a temporary directory under current directory • Using a “for loop” copy all the required files in the temporary directory.

• Create an archive file of the copied files. The name of the archive files is the 3rd argument. Compress the archived file.

• Delete the temporary directory along with copied files.

Example execution: If user type the following ./backup.sh old 5 backup.tar The script will create a compressed archive file named backup.tar.gz in the current directory containing five oldest file in the current directory. ./backup.sh new 4 backup.tar The script will create a compressed archive file named backup.tar.gz in the current directory containing four newest t file in the current directory

How would I create a script named backup.sh and do the 3 arguments?

Have some Python and C++ experience, but Unix in Terminal is completely foreign to me so as much detail as possible would be appreciated.

Thanks!

In: Computer Science

CASE STUDY ANALYSIS Patterns of Antiplatelet Therapy During Noncardiac Surgery in Patients With Second-Generation Drug-Eluting Stent...

CASE STUDY ANALYSIS

Patterns of Antiplatelet Therapy During Noncardiac Surgery in Patients With Second-Generation Drug-Eluting Stent

In this research, answer this:

Make a journal review using this guide questions:

a. How will that information in the journal help you in your practice in the future?

b. What is the journal all about?

In: Nursing

Claudia Maurva, manufacturer of CM denim skirts, has pitched her advertising to develop a "stylish yet...

Claudia Maurva, manufacturer of CM denim skirts, has pitched her advertising to develop a "stylish yet affordable" image for her brand. She is concerned, however, that retailers are undermining this image, and cutting her market share, by pricing them above her recommended retail price of $49.95. A random sample of thirty-two fashion outlets who stock her skirts finds that the average price charged is $52.05 with the standard deviation being $4.68.

1. State the direction of the alternative hypothesis used to test the company's claim. Type the letters gt (greater than), ge (greater than or equal to), lt (less than), le (less than or equal to) or ne (not equal to) as appropriate in the box.
2. Use the tables in the text to determine the critical value used to conduct the test, assuming a 1% level of significance. If there are two critical values, state only the positive value.
3. Calculate the test statistic (two decimal places).
4. Is the null hypothesis rejected at the 1% level of significance? Type yes or no.
5. If in fact the retailers are charging $52.95 on average, determine the nature of the decision made in the test. Type cd (correct decision), 1 (a Type I error was made) or 2 (a Type II error was made) as appropriate.

6. Regardless of your answer for 4, if the null hypothesis was rejected, could we conclude that fashion outlets seem to be charging more than the recommended retail price? Type yes or no.

In: Math

Java programming language: 1.      Create a new Netbeans project called ArrayLoop. 2.      Declare a fixed length array of...

Java programming language:

1.      Create a new Netbeans project called ArrayLoop.

2.      Declare a fixed length array of integers which can store 8 elements. Do not assign any values.

int[] myAddresses = new int[8];

3.      Create a statement which raises 2 to the power of your loop counter, then subtracts 1, and assigns that value to the corresponding element. For example, when i = 3, 2 to the third power is 8, minus 1 = 7. When i = 4, 2 to the fourth power is 16, minus 1 = 15. Etc etc for all values of i.

Fill up the entire array with these values.

4.      Use Array.toString to print out the entire Array to the console.

5.      Create another FOR loop which counts from 8 down to 1.

6.      Use the counter values as indexes to print out your Array values in REVERSE order, from largest to smallest.

7.      Create a String object which stores your last name. Mine would be myName = "Hughes";

8.      Use the .length field to find the number of char's in your name. Use that value in a new FOR loop. This loop will print out the letters of your name one at a time. For example, my output should be:

H

u

g

h

e

s

TIP: Watch out for the 'Off by one' error.

9.      SCREENSHOT AND PRINT all source code in Notepad++.

a.      MARK AND LABEL the line which defines a FOR loop

b.      MARK AND LABEL the line which declares your integer Array.

c.       MARK AND LABEL the line which stores your computed values in the Array.

d.      MARK AND LABEL the line which prints out an entire Array at once.

e.       MARK AND LABEL a line which uses a loop counter as an Array index.

f.        MARK AND LABEL a line which finds the length of your name.

SCREENSHOT AND PRINT all outputs.

In: Computer Science

A. What are the three key components/categories of effective teams? B. Under each of these categories,...

A. What are the three key components/categories of effective teams?

B. Under each of these categories, discuss briefly a few of factors that add or detract from team effectiveness and why.

In: Operations Management

Suppose that 1/2 of all cars sold at a Nissan dealer in a given year are...

Suppose that 1/2 of all cars sold at a Nissan dealer in a given year are Altimas, 1/3 are Maximas, and the rest are Sentras. Suppose that 3/4 of the Altimas, 1/2 of the Maximas, and 1/2 of the Sentras have a moon roof. Answer the following questions. For each question, first decide whether the probability is a conditional probability or not.

  1. What is the probability a randomly selected car has a moon roof?

  2. What is the probability that a randomly selected car has a moon roof given it is a Sentra?

  3. What is the probability a randomly selected car is a Maxima if it has a moon roof?

In: Math

People have done some amazing things to get or keep money! Think of a potential or...

People have done some amazing things to get or keep money! Think of a potential or real issue of an ethical dilemma in compensation. Define the issue and think about what you did or might do under similar circumstances. What would an HR professional and company need to do to avoid or put systems in place to guard against this type of problem, especially with pay for performance plans.  

In: Operations Management

At January 1, 2020, the credit balance of Whispering Winds Corp.’s Allowance for Doubtful Accounts was...

At January 1, 2020, the credit balance of Whispering Winds Corp.’s Allowance for Doubtful Accounts was $401,000. During 2020, the bad debt expense entry was based on a percentage of net credit sales. Net sales for 2020 were $80 million, of which 90% were on account. Based on the information available at the time, the 2020 bad debt expense was estimated to be 0.75% of net credit sales. During 2020, uncollectible receivables amounting to $508,500 were written off against the allowance for doubtful accounts. The company has estimated that at December 31, 2020, based on a review of the aged accounts receivable, the allowance for doubtful accounts would be properly measured at $530,500.

Prepare a schedule calculating the balance in Whispering Winds Corp.’s Allowance for Doubtful Accounts at December 31, 2020.

Balance, January 1, 2020

Bad debt expense accrual

enter a subtotal of the two previous amounts

Uncollectible receivables written off

Balance, December 31, 2020 before adjustment

enter a total amount for the first part

Allowance adjustment

Balance, December 31, 2020

Prepare any necessary journal entry at year end to adjust the allowance for doubtful accounts to the required balance. (Credit account titles are automatically indented when amount is entered. Do not indent manually. If no entry is required, select "No Entry" for the account titles and enter 0 for the amounts.)

Account Titles and Explanation

Debit

Credit

enter an account title

In: Accounting

do you believe that geographical region, occupation, and role in your occupation make a difference in...

do you believe that geographical region, occupation, and role in your occupation make a difference in how you handle conflict? Why?

In: Operations Management

A. What is the difference between formal and informal groups? Give an example of each. B....

A. What is the difference between formal and informal groups? Give an example of each.

B. There are at least 7 ways group cohesiveness can be increased. Pick three and describe them.

C. What is social loafing, and why does it occur (name at least two possible causes) ?

In: Operations Management

Our text tells us that the behavior of group members is shaped by the workgroups, which...

Our text tells us that the behavior of group members is shaped by the workgroups, which " help explain individual behaviors as well as the performance of the group." ( Robbins & Judge, p.139) There are several defining group properties including roles, norms, status, size, cohesiveness, and diversity. Pick three and give a brief explanation of how each might affects the workgroup positively and/or negatively.

In: Operations Management

Describe process to manage inbound freight?

Describe process to manage inbound freight?

In: Operations Management

Motivation is one of the major areas of interest in organizational behavior (OB). Properly motivating a...

Motivation is one of the major areas of interest in organizational behavior (OB). Properly motivating a workforce can lead to gains in productivity, innovation, and employee retention. There are three key elements of motivation. Please describe them.

In: Operations Management

In Python Complete the oddNumbers() functions to take an int (as a parameter). Return a list...

In Python Complete the oddNumbers() functions to take an int (as a parameter). Return a list of all of the odd numbers between 1 and one less than the parameter. Also, complete the evenNumbers() functions to take an int (as a parameter). Return a list of all of the even numbers between 2 and one less than the parameter.

In: Computer Science

a)Write brief notes on how much air pressure is required to start any marine diesel main...

a)Write brief notes on how much air pressure is required to start any marine diesel main engine; how many times should the air reservoir be able to start. The conditions must be clearly stated.

b) What are the main causes of over pressurizing an air reservoir and what are the safety measures put in place?

c) What are the possible causes of an air compressor running for long periods to fill air reservoir
on time?

In: Mechanical Engineering