Unanswered: Storing variables in a shell script for reporting later
I am writing a Unix Shell script to perform different system checks and balances based on criteria requirements from vendor. Things like checking for adequate diskspace, sufficient RAM, etc. I have at each stage of verification variables set so for RAM I have variable $MEM, CPU I have set as $PROC. My question is how to store these variables until the time is to report them out to a .csv file ?? (I understand Perl would handle this differently, but I do not know Perl language)
There are many ways but this is just one method. Save the variable values in a file as code so that the file can be included by any other shell and those variable values read. This program saves 2 variables to a file (tmp.dat).