How can i do something, that will be doing periodicaly for 24 hours
and then do something else.
For example:
i want to write "time" in a text file every 10 sec
but only for the next 24 h and then rewrite all that data to an other file,
then again write "time" in the first file every 10 sec, but it must not contain
any of the old "time" just the new data
and repeat that over and over...
while true; do
sleep 10
echo -e " +%T" >> present.txt
after 24 h do...
present.txt >> old.txt and delete all data in the present.txt, so it
can store new data