Need to add date to script -

Chris Tyler chris at tylers.info
Thu Nov 12 17:48:44 UTC 2009


On Thu, 2009-11-12 at 12:19 -0500, Bob Goodwin wrote:
>     I would like to have a "date" command inserted to separate each
>     group of six lines. Can some one tell me how to do that or point me
>     in the right direction.


To add a date every 6 lines, you could pipe your output through
something like:

|(x=5; while read LINE; do if ((x++==5)) ; then date ; x=0 ; fi ; echo
$LINE ; done)

-Chris




More information about the users mailing list