I have a task to do within one week. I tried to solve it but I did not get the perfect solution.
The task is to read a command line arguments the consists of (progName fileName linesToRead startPosition) OR (progName fileName).
The programs should open the file provided then it should read it for number of linesToRead(i,e: prog test.txt -3) the program should read the first three lines only, similarly for tail. It should read three lines from the bottom of the file.
Pleae if you have any clue for solving such a problem reply to this message as soon as possible.
Thanks in advance