Changes

Jump to: navigation, search

OPS435 Assignment 1 A

136 bytes removed, 01:28, 15 February 2018
Program Name and valid command line arguments
=== Program Name and valid command line arguments ===
Name your Python3 program as <code>usage_report.py</code>. The program should accept the following zero or more command line parameters:* <b><code>--user</code></b> or <b><code>-u</code></b> as an optional first argument, followed by:
* <b><code>filename</code></b>, or
* <b><code>filename1 filename2 </code></b> etc ... - any number of filenames from 1 to as many as the command-line supports.
If the first there is no command line argument is <b><code>--user</code></b> or <b><code>-u</code></b>, then all your python program should get the usage report to be generated should be based on user only. Only regular users should be included in login records from the 'last' command with the user based usage report (excluding super user)appropriate flags.
If there is no one filename provided at the command line, gets the login records from the contents of the given file. The format of the lines in the file should be the same as the output of 'last-F' command with the appropriate flags.
If there is more than one filename provided, merges all the files together with the first one at the top and the last one at the bottom. Read and process the file contents in that order in your program.
1,760
edits

Navigation menu