Apply awk, grep, sed filters

已完成 已发布的 Jun 29, 2002 货到付款
已完成 货到付款

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

工程 Linux MySQL PHP 软件构架 软件测试 UNIX

项目ID: #2858049

关于项目

4个方案 远程项目 活跃的Jun 30, 2002

授予:

cpandz

See private message.

$1 USD 在14天内
(12条评论)
1.9

有4名威客正在参与此工作的竞标,均价$5/小时

jasontepoorten

See private message.

$6.8 USD 在14天内
(27条评论)
5.0
greenlad

See private message.

$6.8 USD 在14天内
(14条评论)
3.4
vw468826vw

See private message.

$4.25 USD 在14天内
(3条评论)
2.4