I am executing a program with a combination of different parameters. I need to keep track of exactly which parameters were supplied with the program at command line. I am maintaining a log file where I need to store these issued commands alogwith summary of the result.
for example, I may issue following commands at different times.
$python myprog.py -i input.txt -o output.txt -x 2 -y 3 -z 9
$python myprog.py input.txt -o output.txt -x 2 -z 9
$python myprog.py -i input.txt -o output.txt -x 2 -y 3
$python myprog.py -i input.txt -o output.txt -z 9
How can I store these commands into my log file?
I am doing this because I might need to re-execute the same program with exact same options.