A More Complete Application
After a long hiatus, we are going to resume work on our
sys_info_page program. Our next addition will add several command-line options to the program as follows:
Output file. We will add an option to specify a name for a file to contain the program’s output. It will be specified as either
Interactive mode. This option will prompt the user for an output filename and will determine if the specified file already exists. If it does, the user will be prompted before the existing file is overwritten. This option will be specified by either
--helpmay be specified to cause the program to output an informative usage message.
Here is the code needed to implement the ...