Apply awk, grep, sed filters
$3-8 USD
Paid on delivery
Use any of the types of filters such as awk, grep, or sed to design a new command/script, called viewprog, which allows the on-screen viewing of a range of lines of a file passed in as an argument to it. The command should be invoked as follows: viewprog num1 num2 fileA where num1 …. the number of the first of the lines you want to view num2 …. the number of the last line you want to view fileA …. denotes the file whose contents you want to view Since a screen displays at most 24 lines, the range of lines to be displayed should not exceed 20, in order to allow space for a message line at the bottom of the screen, plus some spacing. If num2 ??" num1 > 20, only the first 20 lines should be displayed and a one line message at the bottom of the screen should alert the user that there are more lines to be viewed and the space bar should be depressed to see the next 20 lines (if any). If num1 and num2 are in reverse order, so that num2 < num1 , a message should be displayed on the screen, requesting that the command be reentered and that the beginning line number be less than that of the last line. Test the command you have designed and ascertain that it functions correctly with any range of lines, to include the complete file from the beginning to end, and partial ranges, with num1 = 1, that is the beginning line, or num2=$, where the symbol $ denotes the last line of the file.
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
Linux 7.2 using the Bourne Shell
Project ID: #2858049