How to write to a different file everyday day of the week using bash -
I have a script that pulls information from a file and outputs it in a different file what I need to do This script is run everyday but outputs in a different file. It will be in the cronat to run every day, but I do not know how to output a different file every day. Is there a loop that I can use?
Regards, John
T requires a loop instead, Use a filename created using the date '
For example.
$ myprocess.sh> Date is + + "% m-% d-% Y" .log Therefore the date is executed in the backticks (known as the) and output replaced in line . Here the log file is used as the name (in this case 04-24-2014.log)
Comments
Post a Comment