Write a script to help users calculate compressed file size

Assignment Help Basic Computer Science
Reference no: EM13309837

InstructionFor each question, please write a Bash script and a Perl script:

1. Write a script to help users calculate compressed file size. Prompt the user to enter the original size of a file (inbytes) from the keyboard. Then use the following rules for calculating the compressed file size. Display the result on the screen.? If the size is less than 5000 bytes, the compression ratio is 90%;? If the size is between 5000 and 50000 bytes, the compression ratio is 70%;? If the size is more than 50000 bytes, the compression ratio is 40%.

2. Develop a small console program driven by a text menu (see the sample screenshot below):? It displays a simple menu with 4 items indicated by number 1-4.? Users will enter number 1 to 4 to run some commands.? Item #1 to #3 will run some shell commands (it's your choice what to run, but do not use the samecommands as in the example). When the command is finished, display the menu again.? If 4 is entered, then quit the program.

 

Reference no: EM13309837

Questions Cloud

Calculate flow velocities at each section of the pipe : A pipe carrying oil of specific gravity (SG = 0.877) changes in size from 150 mm at section E to 450 mm at section R (E and R are arbitrary designations of the two points in the system).
Calculate the return on assets ratios for the company : Large traded companies like Target, Ford, Apple, etc. are easy to find this type of information on. We recommend you go straight to Hoover's Pro database to find a company profile. This database is the best database available for this type of info..
Calculate the ph when acetic acid is a weak acid : acetic acid is a weak acid. Its Ka is 1.8(10^-5). For a concentration of 0.015 M, calculate the pH.
Find how far apart would the plates have to be : Some sharks respond to very weak electric fields, as weak as 1.0 µV/m. To grasp how weak this field is, how far apart would the plates have to be
Write a script to help users calculate compressed file size : Write a script to help users calculate compressed file size. Prompt the user to enter the original size of a file (inbytes) from the keyboard.
Identify primary characteristics of product : Discuss the type of product the company will offer and identify its primary characteristics.
Elements that might be presented in a balanced scorecard : Define the elements that might be presented in a balanced scorecard and explain how it is used - Make a recommendation of whether or not EEC should adopt the balanced scorecard
Determine reverse-saturation current of the pn junction : Find the voltage v0 and current i0 of the diode circuit shown in the figure below. You may assume a diode cut-in voltage of vy = 0.7V - difference in forward-bias voltages between the two diodes is 0.3V. Determine the reverse-saturation current of t..
Determine the hydraulic conductivity of the sand in field : In the field, if the relative compaction is 90%, determine the hydraulic conductivity of the sand in the field compaction condition (given that k for the sand at the maximum dry density condition is .040 cm/sec and Gs = 2.65).

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd