So do you mean that you want you output file to have a date in it, e.g. for today you want the file to be
out_2014_05_06.txt so you can then (at the end of each month) collect up all of
out_2014_05-*.txt and create an
out_2014_05.tar.gz ?
Is that it? Forgetting the ping/pong bit and this is all about log file management. Is that correct?
If so:-
- What have you tried so far?
- What errors/output/problems are you getting?
- What OS and version are you using?
- What tools are you most comfortable with?
Most importantly,
what have you tried so far?
Going back to the ping/pong one line of code, how would you expect this to end? on unix, the
ping usually continues until interrupted, not like on DOS/Windoze.
You will need to check that manual pages for
ping to check the flags to set a limit. It may be
-n,
-c or something else on your OS. You may have heard that unix is all the same, but at out level, they're all different.
Regards,
Robin