Jump to: navigation, search

OPS435 Assignment 2 for Section C

214 bytes removed, 25 March
Program Name and valid command line arguments
You will that there is an 'args' object in Once the <code>parse_command_args()</code> function is called, it will return an args object. The command line arguments will be stored as attributes of that object. <b>Do not use sys.argv to parse arguments.</b>
If there is only one a file name provided at the command line, read the login/logout records from the contents of the given file. If the there is not file name is "online", get the record on the system your script is being execute using the Linux command "last -iwF". The format of each line in the file should be the same as the output of 'last -Fiw'. Filter out incomplete login/logout record (hints: check for the number of fields in each record). If there is more than one file name provided, merge 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.
=== Header ===

Navigation menu