I have the following problem, I am sure you can help.
Let us suppose I execute some macro in a root session,
sending the stdout to a log file with
root -b -q macro.C >macro.log
In my case, the file macro.C features some parameters,
and I would like to keep the information on these parameters
into the name of the log file.
In other words, if the parameter is X, I would like to
have the following:
root -b -q macro.C (with, say, parameter X=5)
and find the stdout copied in a log file like
In still other words, I would like to backup the content of stdout
into a file macro_5.log, by writing some lines of code inside macro.C.
Maybe with freopen?
Thank you so much.