Question: you will write an interactive shell script to analyze the randomness of the BASH provided ( pseudo ) random number generated environment variable: RANDOM. The

you will write an interactive shell script to analyze the "randomness" of the
BASH provided (pseudo) random number generated environment variable: RANDOM.
The script will accept settings via the command line and environment variables, provide a menu of its
functions to the user, and generate a report, all as detailed below.
If the environment variable SEED is set, then initialize the BASH random number generator with that
value.
Menu Option 1 will prompt the user to enter a number indicating how many random numbers to create.
Menu Option 2 will -
generate random numbers between 1 and 100(the count of which is given in menu option 1),
and then display a 10 bin frequency distribution based on those values.
Menu Option 3 will toggle the format of the date and time for the report between the initial default of
MM/DD/YY HH:MM:SS (AM|PM) TZ and DDD.YYYY (where DDD is Julian day).
Menu Option 4 will write the analysis report consisting of
the date (formatted as directed in menu option 3),
and the frequency distribution (as created in menu option 2),
to the filename given as the sole command line parameter.
Menu Option 5 will exit the script with an error code of 0.
If more than one command line parameter is provided, the script should immediately print the message
Too Many Parameters to stderr and exit with error code 15.

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 Programming Questions!