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
Anna11 [10]
4 years ago
15

Create a file named students containing the following data in your current directory. Each line in this file represents a studen

t's first name, last name, and 3 exam scores. Each line should be regarded as a record containing 5 fields separated by one or more tab characters. You must use the awk command to answer the questions below
Engineering
1 answer:
Ostrovityanka [42]4 years ago
4 0

Answer:

#!/bin/bash

# Simple line count example, using bash

# Usage: ./line_count.sh file

# -----------------------------------------------------------------------------

# Link filedescriptor 10 with stdin

exec 10<&0

# stdin replaced with a file supplied as a first argument

exec < $1

# remember the name of the input file

in=$1

# init

file="current_line.txt"

let count=0

# this while loop iterates over all lines of the file

while read LINE

do

   # increase line counter  

   ((count++))

   # write current line to a tmp file with name $file (not needed for counting)

   echo $LINE > $file

   # this checks the return code of echo (not needed for writing; just for demo)

   if [ $? -ne 0 ]  

    then echo "Error in writing to file ${file}; check its permissions!"

   fi

done

echo "Number of lines: $count"

echo "The last line of the file is: `cat ${file}`"

# Note: You can achieve the same by just using the tool wc like this

echo "Expected number of lines: `wc -l $in`"

# restore stdin from filedescriptor 10

# and close filedescriptor 10

exec 0<&10 10<&-

Explanation:

You might be interested in
A piston-cylinder device contains 0.1 m3 of liquid water and 0.9 m² of water vapor in equilibrium at 800 kPa. Heat is transferre
docker41 [41]

Answer:

Initial temperature = 170. 414 °C

Total mass = 94.478 Kg

Final volumen = 33.1181 m^3

Diagram  = see picture.

Explanation:

We can consider this system as a close system, because there is not information about any output or input of water, so the mass in the system is constant.  

The information tells us that the system is in equilibrium with two phases: liquid and steam. When a system is a two phases region (equilibrium) the temperature and pressure keep constant until the change is completed (either condensation or evaporation). Since we know that we are in a two-phase region and we know the pressure of the system, we can check the thermodynamics tables to know the temperature, because there is a unique temperature in which with this pressure (800 kPa) the system can be in two-phases region (reach the equilibrium condition).  

For water in equilibrium at 800 kPa the temperature of saturation is 170.414 °C which is the initial temperature of the system.  

to calculate the total mass of the system, we need to estimate the mass of steam and liquid water and add them. To get these values we use the specific volume for both, liquid and steam for the initial condition. We can get them from the thermodynamics tables.

For the condition of 800 kPa and 170.414 °C using the thermodynamics tables we get:

Vg (Specific Volume of Saturated Steam) = 0.240328 m^3/kg

Vf (Specific Volume of Saturated Liquid) = 0.00111479 m^3/kg

if you divide the volume of liquid and steam provided in the statement by the specific volume of saturated liquid and steam, we can obtain the value of mass of vapor and liquid in the system.

Steam mass = *0.9 m^3 / 0.240328 m^3/kg = 3.74488 Kg

Liquid mass = 0.1 m^3 /0.00111479 m^3/kg = 89.70299 Kg  

Total mass of the system = 3.74488 Kg + 89.70299 Kg = 93,4478 Kg

If we keep the pressure constant increasing the temperature the system will experience a phase-change (see the diagram) going from two-phase region to superheated steam. When we check for properties for the condition of P= 800 kPa and T= 350°C we see that is in the region of superheated steam, so we don’t have liquid water in this condition.  

If we want to get the final volume of the water (steam) in the system, we need to get the specific volume for this condition from the thermodynamics tables.  

Specific Volume of Superheated Steam at 800 kPa and 350°C = 0.354411 m^3/kg

We already know that this a close system so the mass in it keeps constant during the process.

 

If we multiply the mass of the system by the specific volume in the final condition, we can get the final volume for the system.  

Final volume = 93.4478 Kg * 0.354411 m^3/kg = 33.1189 m^3

You can the P-v diagram for this system in the picture.  

For the initial condition you can calculate the quality of the steam (measure of the proportion of steam on the mixture) to see how far the point is from for the condition on all the mix is steam. Is a value between 0 and 1, where 0 is saturated liquid and 1 is saturated steam.  

Quality of steam = mass of steam / total mass of the system

Quality of steam = 3.74488 Kg /93.4478 Kg = 0,040 this value is usually present as a percentage so is 4%.  

Since this a low value we can say that we are very close the saturated liquid point in the diagram.  

6 0
4 years ago
The principal component in glass manufacturing is_____
Oksanka [162]

Answer:

Silica is the principal component in glass.

Explanation:

Step1

Glass is the amorphous solid and transparent. Glass products have many of the shapes and design that are available in market.

Step2

Natural quartz is the primary source of glass in sand. Silica is the principal component in approximately all glass. Lime stone, soda ash and aluminum oxide are added in the galas for desired properties depending upon application. So, silica is the principal component in glass.

5 0
4 years ago
How many commands can we put on each line in a program? Group of answer choices There can never be too many. No more than five.
timama [110]

Answer:

Kayak n kallabwuej es nnanakamsnkddnnxbxjxndnznsjkansns bnsnsnndbz jsjjs hsjsjuw jwuqnabja jakaksnbdb jzhhqjuq jsjsbjdwi jajaksksiq jsjiwqikakal

8 0
3 years ago
Study the graphs below what type of trend and pattern in observed .
hichkok12 [17]

Answer:

negative and linear

Explanation:

its a straight line going down

8 0
3 years ago
Read 2 more answers
What is professional engineering?
Nina [5.8K]

Answer:

professionl engineering means and individual who has fufilled academic and experience requirements and permitted by government to offer engineering services directly to the public

plz mark brainliest✌️✌️

7 0
3 years ago
Other questions:
  • Consider a finite wing with an aspect of ratio of 7; the airfoil section of the wing is a symmetric airfoil with an infinite-win
    9·1 answer
  • A concentric tube heat exchanger for cooling lubricating oil is comprised of a thin-walled inner tube of 25 mm diameter carrying
    13·1 answer
  • Asperities are microscopic peaks and valleys on
    7·2 answers
  • The water behind Hoover Dam is 206m higher than the Colorado river below it. At what rate must water pass through the hydraulic
    15·2 answers
  • Consider the simplicity of these two DOE examples. Next, consider the assertion that DOE isn’t put into practice as often or dee
    13·1 answer
  • (25 points).The heat is turned on in a building in a cold morning, but the heater does not burnthe natural gas properly and emit
    13·1 answer
  • Which of the following are the main psychological domains?
    7·1 answer
  • Assume a steel pipe of inner radius r1= 20 mm and outer radius r2= 25 mm, which is exposed to natural convection at h = 50 W/m2.
    12·1 answer
  • Design a solid steel shaft to transmit 14 hp at a speed of 2400rpm f the allowable shearing stress is given as 3.5 ksi.
    10·1 answer
  • When a retaining structure moves towards the soil backfill, the stress condition is called:__________.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!