Hi,
Awie's methods are accurate, but instead of piping the
output, I tend to save the perl script, and then chmod
700 ./filename. (Awie, this is important as it sets
the executable status on the file!!). I then copy the
perl script into the folder that contains the
access.log and type the following:
./perlscript <access.log >access2.log
and then I view access2.log.
Regards,
Thomas Adam
--- Awie <awie@eksadata.com> wrote: > Hi,
>
> The script is pretty simple, I just created a TEXT
> file (i.e convert) in
> directory (i.e /bin) that contain line as below (1
> line) :
>
> /usr/bin/perl -pe 's/\d+/localtime $&/e;'
>
> Then I run chmod +x /bin/convert (I did not know it
> is necessary or not).
>
> After that, I went to my Squid's log directory and
> run ANY utility that able
> to view the log such as "grep" or "cat" or "vi" or
> whatever with pipe to my
> file. i.e:
>
> vi access.log | /bin/convert
>
> I got a readable format of time & date of my
> access.log.
>
> Hope it is clear enough.
>
> Thx
>
> Awie
>
> ----- Original Message -----
> From: "ajay chaudhari" <ajaylinux@yahoo.com>
> To: <squid-users@ircache.net>
> Sent: Wednesday, February 07, 2001 1:40 PM
> Subject: Re: [SQU] Converting time format
>
>
> > > --- Awie <awie@eksadata.com> wrote: > All,
> > > >
> > > > I created a script;
> > > >
> > > > /usr/bin/perl -pe 's/\d+/localtime $&/e;'
> > > >
> > > > and save it to be a file named "convert" in
> > > > directory /bin. Then I run "chmod +x
> /bin/convert"
> > > >
> > > > After all, I run "cat access.log |
> /bin/convert".
> > > >
> > > > IT WORKS !
> > > >
> >
> > Hi Awie can you send the script to me and give
> details
> > as to how to use it, I am useing Redhat Linux 6.2.
> >
> > Warm Regards
> >
> > Ajay
> >
> >
> >
> > =====
> > Warm Regards
> >
> > Ajay Chaudhari
> > Mumbai
> > pager:-9602-101616
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great
> prices.
> > http://auctions.yahoo.com/
> >
> > --
> > To unsubscribe, see
> http://www.squid-cache.org/mailing-lists.html
> >
>
>
>
> --
> To unsubscribe, see
> http://www.squid-cache.org/mailing-lists.html
>
=====
Thomas Adam
Linux Co-ordinator for The Purbeck School
e-mail (school): n6tadam@users.purbeck.dorset.sch.uk
e-mail (yahoo) : thomas_adam16@yahoo.com
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
-- To unsubscribe, see http://www.squid-cache.org/mailing-lists.htmlReceived on Wed Feb 07 2001 - 08:09:24 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:57:54 MST