RE: Need to add date to script -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

The only comment that I would add to this suggestion it to take note
that all shell logic references logical lines.  6 logical lines equates
to pressing the enter key 6 times.  If this is what you mean rather than
phyically seeing 6 lines then you are okay.

Shirley 

-----Original Message-----
From: fedora-list-bounces@xxxxxxxxxx
[mailto:fedora-list-bounces@xxxxxxxxxx] On Behalf Of Chris Tyler
Sent: Thursday, November 12, 2009 12:49 PM
To: Community assistance, encouragement,and advice for using Fedora.
Subject: Re: Need to add date to script -

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

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines:
http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux