I've got a rather big shell script going now.
A part of it contains a while loop, which can run up to five times,
depending on various elements.
At the top of the script I have defined three variables, that gives me
a good looking and logical log, they are:
info="INFO------`date +%d/%m/%y' '%T` >"
warn="WARN------`date +%d/%m/%y' '%T` >"
err="ERROR-----`date +%d/%m/%y' '%T` >"
When I later on in the scripts append info to the log, I e.g. write:
echo "$info There is a new file today, continuing\r" >>$log
THE PROBLEM is, that all log entries gets the same timestamp. Even in
the while loop, where the script sleeps for five minutes up to six
How do I make a "dynamic" timestamp? I have tried to make a function,
but no gain. I would still like to write my output to the log, as