Usage: python tail.py [OPTION] [FILE]
Print the last 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.
Mandatory arguments to long options are mandatory for short options too:
-h, --help display this help and exit
-n, --lines=K output the last K lines, instead of the last 10; or use -n +K to output starting with the Kth line
Note: when executed in Unix-like system, users can run as the unix command style:
$ mv tail.py tail
$ chmod +x tail
$ ./tail [OPTION] [FILE]
See also: Github
In [1]:
%run tail.py -h
In [2]:
%run tail.py --help
In [3]:
%run tail.py shakespeare.txt
In [4]:
%run tail.py -n 5 shakespeare.txt
In [5]:
%run tail.py --lines 5 shakespeare.txt
In [6]:
%run tail.py -n +20 shakespeare.txt
In [7]:
%run tail.py --lines +20 shakespeare.txt
In [8]:
%run tail.py shakespeare.txt she.txt