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

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -