1 The contents of the shell script even_sum.bash is shown below. Write down the output on...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1 The contents of the shell script even_sum.bash is shown below. Write down the output on when you execute it with the command: ./even_sum.bash 10 #!/bin/bash SUM=0 for ((i=0; i<=$1; i++)) do if test $((i%2)) -eq 0 then fi done SUM=$((SUM + i)) echo $SUM 1 The contents of the shell script even_sum.bash is shown below. Write down the output on when you execute it with the command: ./even_sum.bash 10 #!/bin/bash SUM=0 for ((i=0; i<=$1; i++)) do if test $((i%2)) -eq 0 then fi done SUM=$((SUM + i)) echo $SUM
Expert Answer:
Answer rating: 100% (QA)
The given shell script evensumbash calculates the su... View the full answer
Related Book For
Operating Systems Design And Implementation
ISBN: 9780131429383
3rd Edition
Authors: Andrew Tanenbaum, Albert Woodhull
Posted Date:
Students also viewed these computer network questions
-
Assume you are a dissertation chair. You have a student who has come to you with a problem space and is struggling with choosing the methodology for the study. How would you explain to this person...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Write a bash script that accepts a persons name as acommand-line argument and simply prints out the following greeting:"Good day, ! Nice to meet you!", where is a positional parameter (i.e.,...
-
96. A 66-year-old woman with a long history of heavy smoking presents to her doctor with complaints of shortness of breath and chronic coughing that has been present for about 2 years and has been...
-
Terminal Grain Corporation brought an action against Glen Freeman, a farmer, to recover damages for breach of an oral contract to deliver grain. According to Terminal Grain, Freeman orally agreed to...
-
The following is a draft set of simplified financial statements for Pear Limited for the year ended 30 September 2013. The following information is available: Required: Prepare a revised set of...
-
Charles Bartz purchases a 1/8 ORI for $10,000. Proved reserves at year-end 2016 are 20,000 barrels, and production for 2016 was 3,000 barrels. Prepare journal entries for Charles Bartz and compute...
-
Which of the following is true about the rental of real estate? a. Depreciation and maintenance expenses for an apartment complex are deductible. b. A vacation home is a home that is rented for 15...
-
1. Define Marked Departure? (1 mark) 2. How many days is a stunt driver licence suspension? Ref: How long is the impound for a motor vehicle for Stunt Driving? Ref: Who is responsible for payment...
-
Denise Lopez, age 40, is single and has no dependents. She is employed as a legal secretary by Legal Services, Inc. She owns and operates Typing Services located near the campus of Florida Atlantic...
-
2. A 1500-kg load is hung from an aluminum bar (E-72.4 GPa;v=0.31) of dimensions 2x 0.015 x 0.01 m and stretches it elastically along the long axis. (a) Solve for its change in length and change in...
-
Calculate the crystallographic density of MgO in g/cm3? (Avogadro's number=6.022 1023 atoms/mol and = 10-8 cm) rMg2+ = 0.072 nm rO2- = 0.14 nm AWMg = 24.31 g/mol AWO = 16 g/mol
-
Calculate the minimum kinetic energy that the carriage should possess at the top of the 15M diameter loop and the minimum height of release(h) of a roller coaster carriage to complete the loop.Mass...
-
A bank is considering some investment portfolio shifting.In doing so, the bank is considering selling $3,000,000 in 5 year county government bonds with a coupon interest of 3 percent, and purchasing...
-
Calculate the Young's modulus (in GPa) in the longitudinal direction of a unidirectional carbon fiber reinforced epoxy composite having 0.35 volume fraction of fibers. The Young's modulus of the...
-
The weight of a concrete column is 10.3 kN with a density of 2.30 g/cm3 . (a) Convert the weight from kN to N and the density from g/cm3 to kg/m3 . Note: 100 cm = 1 m. (b) Determine the mass of the...
-
Q:Question:Use the definitions of Big O to show that:A:Answer:4) a) Theta definition: f(n) is theta(g(n)), if th...
-
X-1 Find the domain of the function f(x) : x 1 2 - O (-00, -1) U (-1, ) O (-00, 1) U (1, ) O -00, -1) U (-1, 1) U (1, 0) O (- 1, 1)
-
A bitmap terminal contains 1200 by 800 pixels. To scroll a window, the CPU (or controller) must move all the lines of text upward by copying their bits from one part of the video RAM to another. If a...
-
An alternative to interrupts is polling. Are there any circumstances you can think of in which polling is a better choice?
-
Suppose that process A in Fig. 3-15 requests the last tape drive. Does this action lead to a deadlock? Process A 3 B 0 C 1 D E 0 Tape drives 1 1 100 110 1 1 0 0 0 0 Resources assigned Plotters...
-
The city of Bremerton is considering the purchase of a photocopying machine for $7,300 on December 31, 2007, useful life five years, and no residual value. The cash operating savings are expected to...
-
The head of the consulting division of a major firm has proposed investing $300,000 in personal computers for the staff. The useful life of the computers is five years. Computers qualify for Class...
-
G. Esteban, the president of a Toronto trucking company, is considering whether to invest $410,000 in new semiautomatic loading equipment that will last five years, have zero scrap value, and...
Study smarter with the SolutionInn App