Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
A shell script that will call 2 Perl program scripts. In addition to calling the 2 Perl scripts.
A shell script that will call 2 Perl program scripts. In addition to calling the 2 Perl scripts. The shell script will be the main interface presenting a menu of options to the user as well as have a built in function to sort a data file. The shell script will (1) accept a valid filename at the start of execution, which will be a file that will contain data in the form of a list of words, one per line, and at least 50 entries (/usr/share/dict/words).
This filename will be used in the shell for both a (2) shell function to sort the data in the file and write it to another file in that format, as well as a (3) call to a Perl script that will do the same thing using Perl functions. As with the shell script, the Perl script will sort the file, but the shell script is responsible for writing the sorted data to another file. (4) With either the shell or the Perl way to sort the original file, then prompt for a filename to write the sorted data into.
To start the shell, (5) ensure that the user started the shell passing in a filename, and if not either prompt for the filename, or exit the shell with a USAGE : statement. Once in the shell will prompt the user with a (6) menu interface that will allow the user to select sorting of the file using the shell, sorting using the Perl script, another Perl script, or exit.
Another Perl script will also use the filename gathered at the start of the shell script, but this Perl script will (7) search for a word in that file and return the line number(s) that word is on, or a "not found" message. This Perl script will require to (8) open the file in the Perl script and prompt the user for the word to search for. (9) prompt the user either in the shell or the Perl program for the word its are looking for.
Menu
$ lab3.sh /usr/share/dict/words
Menu
-------
1) Shell sort
2) Perl sort
3) Perl search
4)Exit
Enter selection :
If user does not add a filename at the command line, prompt for a filename, if none given, then exit. Must also need to test for the existence and that the file is not of 0 size. If it doesn't exist or is of 0 size, exit with USAGE: "enter a filename that exists..."