Question: Write a linux shell script. Objective: Implementing your own well formatted human-readable (-h) printout. Your answers should be copied and pasted into a text box

Write a linux shell script.

Objective: Implementing your own well formatted human-readable (-h) printout.

Your answers should be copied and pasted into a text box or uploaded as a shell script.

Example 3:

You have a file sizes of numbers measured in kB. Here are some example lines

453 1092 49783 8529 982645

Convert this file so that each number has a size suffix, either kB or MB, so that no number is larger than 10000. (i.e., 10 would become 10kB, while 100000 would become 97MB, since 1MB=1024kB.) You can assume the largest number in the file is 10000000(kb), and you can drop any fractional MB for those numbers you convert. The example lines above, after conversion, would be

453kB 1092kB 48MB 8529kB 959MB

write the script and display the output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!