answer.
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
blondinia [14]
2 years ago
10

Modify the script, problem2.sh that does the following: 1. Creates a new variable (it does not have to be an environment variabl

e) that is OUTFILE concatenated with ".out" 2. Prints out the value of this new variable (Hint: Use the echo command to print in bash.) 3. Creates a new variable that is OUTFILE concatenated with ".err" 4. Prints out the value of this new variable (Hint: Use the echo command to print in bash.) 5. Write a one line bash command that: 1. Runs cmd1 getting the input from INFILE 2. Pipes the output to cmd3 redirecting stdout (but not stderr!) to the filename you created in step 1, and stderr (but not stdout!) to the filename you created in step 3. When running with INFILE set to test
Computers and Technology
1 answer:
Marat540 [252]2 years ago
7 0

<u>Solution and Explanation:</u>

problem2.sh

#!/usr/bin/env bash

# output file name for stdout

FILEOUT='test.out'

echo $FILEOUT

# output file name for stderr

FILEERR='test.err'

echo $FILEERR

# opening test.in and pipe to cmd1 and output of cmd1 pipe to cmd3 and giving file for stdout and stderr

cat test.in | ./cmd1 | ./cmd3 > $FILEOUT 2>$FILEERR

# END OF SCRIPT

# NOTE: it is to make sure all files in same directory including test.in

After running problem2.sh

$ ./problem2.sh

test.out

test.err

You might be interested in
Select the correct text in the passage.
aliina [53]

Answer: When was admitted, hospital authorities recorded his medical history. Then, placed in an ICU where his vital signs were constantly monitored.

Explanation: With the help of computers, medical histories are often kept in the computer for future reference. Machines are connected to computers to record vital signs.

4 0
2 years ago
A distribution of software that simplifies administration by identifying dependencies, automatically updating configuration file
emmasim [6.3K]

Answer:

Package

Explanation:

In a conventional kind of definition, a software package is basically several applications or code modules that work hand-in-hand to meet a range of goals and objectives. One of the most well-known examples is package like the Microsoft Office package, which consist of individual applications such as Excel, Word, Access and PowerPoint.

It can also be said to be numerous individual files or resources that are packed together as a software set which is meant to provides specific functionality as part of a larger system.

6 0
2 years ago
Greg is writing a report on becoming an advertising and promotions manager. Complete the report by correctly filling in the miss
zzz [600]

Since Greg wants to become an advertising and promotions manager, he needs to at least gain a (B) bachelor’s degree level of education, since generally, this educational background is expected from individuals who wishes to work in an entry-level position in the field of advertising.

One of the skills that he also needs to develop is (C) communication skills, because he would have to be able to communicate in both written and spoken to develop the advertisements according to the client’s desires.

8 0
2 years ago
GJAUDRO: A member of a team. Question 2 with 1 blankARBCUE: Activity that is practiced under the water. Question 3 with 1 blankE
kramer

Answer:

1 jugador

2 bucear

3 equipo

4 ciclismo

5 pasear

6 tenis

Explanation:

ur welcome

6 0
2 years ago
There are three seating categories at a stadium. Class A seats cost $20, Class B seats cost $15, and Class C seats cost $10. Wri
Westkost [7]

Answer:

Following are the program to this question:

def calculate_income(num,seat):#defining method calculate_income

   if seat=="A": #defining condition for seat a

       return num * 20 #return value

   if seat=="B": #defining condition for seat b

       return num * 15 #return value

   if seat=="C": #defining condition for seat c

       return num * 10 #return value

def show_income(a,b,c): #defining method show_Income

   sum=a+b+c # add total seats income

   print("Income for A class seats: $",a) #print value

   print("Income for B class seats: $",b) #print value

   print("Income for C class seats: $",c) #print value

   print("Total Income: $",sum) #print value

def main(): # defining main method

   a=int(input("Enter class A seats: ")) #input seats a value

   b=int(input("Enter class B seats: ")) #input seats b value

   c=int(input("Enter class C seats: ")) #input seats c value

   a_income=calculate_income(a,"A")  #call method for seat a

   b_income=calculate_income(b,"B") #call method for seat b

   c_income=calculate_income(c,"C") #call method for seat c

   show_income(a_income,b_income,c_income) # call method show_income for print all seat value

main()

Output:

Enter class A seats: 2

Enter class B seats: 3

Enter class C seats: 2

Income for A class seats: $ 40

Income for B class seats: $ 45

Income for C class seats: $ 20

Total Income: $ 105

Explanation:

The description of the above program can be described as follows:

  • In the above python program, three methods "calculate_income, show_income, and the main method" were defined.  
  • The method "calculate_income" accepts two-variable "num and seat" as the parameter, inside the method a three if block is used, that calculate all types of seat class rate and returns its value.
  • In the "show_income", we add all the seat value in the sum variable and use the print method, that prints all seat cost, and total cost.
  • In the main method, we input all seat value from user input and pass into the calculate_income method and collect all the return value, after calculating calculate_income we pass its return value into the show_income method, that prints all value.
5 0
2 years ago
Other questions:
  • What is the argument in this function =AVERAGE(F3:F26)
    15·1 answer
  • Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an un
    13·1 answer
  • Which term describes a process by which malicious code can enter from a non-secure network, and make a hairpin, or sharp turn, a
    6·1 answer
  • Suppose a retailer who has no technology expertise wishes to set up an online presence for his business. He ________. a. ​can us
    6·1 answer
  • The function below takes two arguments, a dictionary called dog_dictionary and a list of dog names (strings) adopted_dog_names.
    8·1 answer
  • A website updated daily could be considered _____. a. authoritative b. objective c. accurate d. timely
    8·1 answer
  • Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 sec
    12·1 answer
  • Information in​ folders, messages,​ memos, proposals,​ emails, graphics, electronic slide​ presentations, and even videos create
    7·1 answer
  • Write measurable performance objectives.Suppose that a trainer has identified as a generalgoal for a training module,"Able to fo
    13·1 answer
  • You modify a document that is saved on your computer. Where are the changes stored until you save the document again?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!