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
The wheel and the attached reel have a combined weight of 50lb and a radius of gyration about their center of 6 A k in = . If pu
marishachu [46]

The complete question is;

The wheel and the attached reel have a combined weight of 50 lb and a radius of gyration about their center of ka = 6 in. If pulley B that is attached to the motor is subjected to a torque of M = 50 lb.ft, determine the velocity of the 200lb crate after the pulley has turned 5 revolutions. Neglect the mass of the pulley.

The image of this system is attached.

Answer:

Velocity = 11.8 ft/s

Explanation:

Since the wheel at A rotates about a fixed axis, then;

v_c = ω•r_c

r_c is 4.5 in. Let's convert it to ft.

So, r_c = 4.5/12 ft = 0.375 ft

Thus;

v_c = 0.375ω

Now the mass moment of inertia about of wheel A about it's mass centre is given as;

I_a = m•(k_a)²

The mass in in lb, so let's convert to slug. So, m = 50/32.2 slug = 1.5528 slug

Also, let's convert ka from inches to ft.

So, ka = 6/12 = 0.5

So,I_a = 1.5528 × 0.5²

I_a = 0.388 slug.ft²

The kinetic energy of the system would be;

T = Ta + Tc

Where; Ta = ½•I_a•ω²

And Tc = ½•m_c•(v_c)²

So, T = ½•I_a•ω² + ½•m_c•(v_c)²

Now, m_c is given as 200 lb.

Converting to slug, we have;

m_c = (200/32.2) slugs

Plugging in the relevant values, we have;

T = (½•0.388•ω²) + (½•(200/32.2)•(0.375ω)²)

This now gives;

T = 0.6307 ω²

The system is initially at rest at T1 = 0.

Resolving forces at A, we have; Ax, Ay and Wa. These 3 forces do no work.

Whereas at B, M does positive work and at C, W_c does negative work.

When pulley B rotates, it has an angle of; θ_b = 5 revs × 2π rad/revs = 10π

While the wheel rotates through an angle of;θ_a = (rb/ra) • θ_b

Where, rb = 3 in = 3/12 ft = 0.25 ft

ra = 7.5 in = 7.5/12 ft = 0.625 ft

So, θ_a = (0.25/0.625) × 10π

θ_a = 4π

Thus, we can say that the crate will have am upward displacement through a distance;

s_c = r_c × θ_a = 0.375 × 4π

s_c = 1.5π ft

So, the work done by M is;

U_m = M × θ_b

U_m = 50lb × 10π

U_m = 500π

Also,the work done by W_c is;

U_Wc = -W_c × s_c = -200lb × 1.5π

U_Wc = -300π

From principle of work and energy;

T1 + (U_m + U_Wc) = T

Since T1 is zero as stated earlier,

Thus ;

0 + 500π - 300π = 0.6307 ω²

0.6307ω² = 200π

ω² = 200π/0.6307

ω² = 996.224

ω = √996.224

ω = 31.56 rad/s

We earlier derived that;v_c = 0.375ω

Thus; v_c = 0.375 × 31.56

v_c = 11.8 ft/s

3 0
4 years ago
A heat engine is coupled with a dynamometer. The length of the load arm is 900 mm. The spring balance reading is 16. Applied wei
miss Akunina [59]

Answer:

P = 80.922 KW

Explanation:

Given data;

Length of load arm is 900 mm = 0.9 m

Spring balanced  read 16 N

Applied weight is 500 N

Rotational speed is 1774 rpm

we know that power is given as

P = T\times \omega

T Torque = (w -s) L = (500 - 16)0.9 = 435.6 Nm

\omega angular speed =\frac{2 \pi N}{60}

Therefore Power is

P =\frac{435.6 \time 2 \pi \times 1774}{60} = 80922.65  watt

P = 80.922 KW

4 0
4 years ago
Convert A'B'C'D' + A'B'C'D + A'B'CD' + A'BC'D + AB'C'D' + AB'C'D+ AB'CD' to SOP form
bazaltina [42]

Answer:

thats really hard how could you answerthis hhhhhhh

6 0
3 years ago
Read 2 more answers
What is the measurement below?
Bess [88]

Explanation:

इसिसिसिसैस्स्स्स्स्स्स्स्स्स्सूस्सोस्स्स्स्स्स

8 0
3 years ago
An 1,840 W toaster, a 1,420 W electric frying pan, and a 70 W lamp are plugged into the same outlet in a 15 A, 120 V circuit. (T
Viktor [21]

Answer:

A)

Current drawn by toaster = 15.33 A

Current drawn by electric frying pan = 11.83 A

Current drawn by lamp = 0.58 A

B)

The fuse will definitely blow up since the current drawn by three devices (27.74 A) is way higher than 15 A fuse rating.

Explanation:

There are three devices plugged into the same outlet.

Toaster = 1840 W

Electric frying pan = 1420 W

Lamp = 70 W

Since the three devices are connected in parallel therefore, the voltage across them will be same but the current drawn by each will be different.

A) What current is drawn by each device?

The current flowing through the device is given by

I = P/V

Where P is the power and V is the voltage.

Current drawn by toaster:

I = 1840/120

I = 15.33 A

Current drawn by electric frying pan:

I = 1420/120

I = 11.83 A

Current drawn by lamp:

I = 70/120

I = 0.58 A

B) Will this combination blow the 15-A fuse?

The total current drawn by all three devices is

Total current = 15.33 + 11.83 + 0.58

Total current = 27.74 A

Therefore, the fuse will definitely blow up since the current drawn by three devices (27.74 A) is way higher than 15 A fuse rating.

5 0
4 years ago
Other questions:
  • A food department is kept at -12 °C by a refrigerator in an environment at 30 °C. The total heat gain to the food department is
    8·1 answer
  • A wall in a house contains a single window. The window consists of a single pane of glass whose area is 0.15 m2 and whose thickn
    10·1 answer
  • A mercury thermometer has a cylindrical capillary tube with an internal diameter of 0.2 mm. If the volume of the thermometer and
    10·1 answer
  • The news media often report an earthquake's magnitude on the Richter scale. Which of the following items are characteristics of
    14·1 answer
  • A process consists of two steps: (1) One mole of air at T = 800 K and P = 4 bar is cooled at constant volume to T = 350 K. (2) T
    7·1 answer
  • A subsurface exploration report shows that the average water content of a fine-grained soil in a proposed borrow area is 22% and
    9·1 answer
  • The technique of smoothing out joint compound on either side of a joint is known as which of the following
    14·1 answer
  • Explain the underlying physical reason why when we conduct various heat treatments on 1018 steel we expect the modulus of elasti
    8·1 answer
  • The percentage modulation of AM changes from 50% to 70%. Originally at 50% modulation, carrier power was 70 W. Now, determine th
    15·1 answer
  • What's the best way to find the load capacity of a crane?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!