I wanted to be able to write the output of the script to a file instead of stdout. I added two new flags to the option parser, -p and -o, which toggle the stdout printing and define the output file. If no output file is provided, the printing is set to true. Else, if the printing is switched off but the output file is also empty, the printing defaults back to true.
I wanted to be able to write the output of the script to a file instead of stdout. I added two new flags to the option parser,
-p
and-o
, which toggle the stdout printing and define the output file. If no output file is provided, the printing is set to true. Else, if the printing is switched off but the output file is also empty, the printing defaults back to true.