Write a bash script file that will play the Master Mind game. The script must be fully documented explaining the purpose of the commands or functions. Must be able to excute from the command line. Develop a flowchart for the script. Execute the script and capture the user displays and responses into a file. Generating the pseudo-random number Example 1. isec=`date+%` #Set isec to the number of seconds #since jan 1, 1970 isec=`expr $isec '*' 1237 + 1`#Make it a prime number sort-of i1=`expr substr $isec 10 1` #Set the 1st selected digit to the 10th i2=`expr substr $isec 9 1` #Set the 2nd selected digit to the 9th i3=`expr substr $isec 7 1` #Set the 3rd selected digit to the 7th i4=`expr substr $isec 8 1` #Set the 4th selected digit to the 8th Example 2. ((s1=$RANDOM % 9 + 1 )) #Use the random number function in the shell ((s2=$RANDOM % 9 + 1 )) ((s3=$RANDOM % 9 + 1 )) ((s4=$RANDOM % 9 + 1 ))
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.
## Platform
Red Hat Linux 7.2