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
blondinia [14]
3 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]3 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
If directory server a trusts directory server b, directory server b trusts directory server c, and directory server a trusts dir
topjm [15]
This is a transitive trust which is a two-way correlation routinely made among parent and child domains in a microsoft active directory forest and when a new domain is produced, it bonds resources with its parent domain by evasion in which allowing an valid user to access resources in together the child and parent.
4 0
4 years ago
3. Rajat wants to assign green colour to a paragraph. Write the code that will help him in completing the task
coldgirl [10]

Explanation:

use the style attribute

4 0
3 years ago
What are the advantages and disadvantages of nuclear energy?
Vilka [71]
Advantages: Nuclear energy has the ability to produce electricity without greenhouse gas emissions. It produces electricity without pollution

Disadvantages: The nuclear weapons threats. Some reactors produce plutonium which can be used to make nuclear weapons
7 0
3 years ago
Which of the following are possible ways to
Andru [333]

Answer:

employ ability assessments and the ability to perform tasks

Explanation:

6 0
3 years ago
Read 2 more answers
Which item is used for formatting in responsive web design?
taurus [48]

Answer:

3) Improving image quality

Explanation:

A responsive web design is a web design that makes website to be user friendly to website users. It enables the users to have an optimal and enjoyable experience when making use of websites.

A responsive web design is the basis on which websites are built. It makes websites interactive for users such that that find the websites easy to access, easy to read and very interactive.

Computer programs used for creating a responsive web design are:

a) JavaScript

b) Cascading Style Sheets e.t.c

The item used for formatting a responsive web design is Improving Image quality. This helps to make the website responsive for users.

3 0
3 years ago
Other questions:
  • For window 7 explain the steps you us to find the available program your software will list ?
    8·1 answer
  • At an uncontrolled intersection, you should yield to the car on the right. True or false.
    10·2 answers
  • Which statement about the Paste Link option is true? A)Even if the source file (spreadsheet) is deleted, the data updates automa
    11·1 answer
  • When you tell a computer what to do, you are providing input?
    11·1 answer
  • There are several factors that can substantially affect the consumer search process. Match the factor with an example of how the
    5·1 answer
  • In regard to protective actions for explosive devices, the area where the blast originates is referred to as ___________ perimet
    8·1 answer
  • Which of the following is productivity strategy for collaboration?
    6·1 answer
  • Defensive programming is sometimes referred to as _________.
    5·1 answer
  • How is the go button on m computer?
    10·1 answer
  • EXPLAIN WHY CRYPTOCURRENCIES ARE NOT RELIABLE.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!