Project 3
This project tests your ability to
- work with command line arguments;
- work with text stream I/O methods;
- use different methods of Array object.
Please write a script named tail.js that:
- takes a file name as an argument from the command line (this is a required argument);
- another argument (optional) is to be in the form: -n <integer number>;
- reads the specified file;
- prints a number of the last lines from the file;
- the number of lines to print is either 10 (the default value) or the number assigned by the other
argument.
Additional requirements are:
This project is due by 11:59pm on Monday, April 5, 2004.