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 will prompt the user to enter a number indicating how many random numbers to create.
Menu Option will
generate random numbers between and the count of which is given in menu option
and then display a bin frequency distribution based on those values.
Menu Option will toggle the format of the date and time for the report between the initial default of
MMDDYY HH:MM:SS AMPM TZ and DDDYYYY where DDD is Julian day
Menu Option will write the analysis report consisting of
the date formatted as directed in menu option
and the frequency distribution as created in menu option
to the filename given as the sole command line parameter.
Menu Option will exit the script with an error code of
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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
