How to sort a file -

Bob Goodwin bobgoodwin at wildblue.net
Tue Aug 4 17:12:03 UTC 2009


Bob Goodwin wrote:
> Bill Davidsen wrote:
>> Bob Goodwin wrote:
>>>
>>> I have a file of Netgear router data that I would like to sort on 
>>> date and time.
>>> the form is as below:
>>>
>>>    [Site allowed: weather.noaa.gov] from source 192.168.1.9 Saturday,
>>>    Aug 01,2009 17:02:51
>>>    [Site allowed: safebrowsing-cache.google.com] from source
>>>    192.168.1.11 Saturday, Aug 01,2009 17:00:16
>>>    [Site allowed: safebrowsing.clients.google.com] from source
>>>    192.168.1.11 Saturday, Aug 01,2009 17:00:13
>>>
>> Looks like a case for a few lines of perl, and a quick call to sort 
>> for the ordering, probably the easiest fix.
>>
>> See attached if the mailer doesn't eat it.
>>
>
>
> No the mailer didn't "eat it," but I haven't figured how to implement 
> it. After some experimenting I have to admit I need an example. I am 
> eager to see it work though.
>
>
>
>
>
    It looks like  "/home/bobg/apps/logsort.pl  /home/bobg/NG-LOG >
    /home/bobg/NG-LOG2" does the sort and puts it all in NG-LOG2.

    Thanks.

    Bob






More information about the fedora-list mailing list