Assignment 4: E-mail me (using proper subject line) the shell scripts you've written for all four and, for 3.2 and 3.4, the URL of the web page.
4.1 Write a shell script which takes an integer, n, as input and produces as output the number of n-letter words contained in /usr/share/dict/words (or , better yet:
/home/SRUNET/david.dailey/words)
as well as one example chosen randomly with equal probability from among all
of those n-letter words. Output should be as shown:$ ./count 7
there are 7375 7-letter words, including "foreign"
4.2 Make a web page with an input and a button. When the user inputs a number, the number is submitted to your "count" program, through cgi, with the output being returned as a web page.
4.3 Three files from the US census bureau are located in
/home/SRUNET/david.dailey/data$ wc dis*
88800 355197 3107986 dist_all_last
4275 17100 153900 dist.female.first
1219 4876 43884 dist.male.first
94294 377173 3305770 totalWrite a UNIX shell script which takes two parameters as input: the first parameter has values of either "female", "male" or "all"; (or "last";) the second parameter is an alphabetic string (it should accept either upper or lowercase names or integers as the second parameter.) The script returns, as output, the number of names (in the file identified by the first parameter) that begin with the second parameter (e.g., in 'dist_female_first.txt' , there are 12 names beginning with 'DON' )as well as the three most common instances of such and their rankings (in 'dist_female_first.txt' those 3 names would be 'DONNA' , 'DONA', and 'DONNIE'.)
4.4 Make a web page having two fields and a button located in a form. One of the fields should be a "select" field with options "female", "male" and "all"; the other should be a standard input, and will contain a search string typed by the user that will be looked up in the census data. When the button is clicked to submit the user-chosen data, a shell script like the one you wrote for 4.3 above should be activated. This script should display, in the browser, a new HTML page with output properly displayed (using <br> tags and other typesetting niceties).