And again, my shell wont do it !!!
vweb$ cat 2001.log | perl -ne '/\/en\// && print'
bash: cat: command not found
vweb$
Oh what fun !
I think what I was doing was working ok, so I did a script :
perl -e 'open(I,"/logs/access.www.nuvotem.com");while(<I>){print $_
if($_=~/2001/);}' >/tmp/2001.log
perl -e 'open(I,"/tmp/2001.log");while(<I>){print $_ if($_=~/GET\
\/en\//);}' >/tmp/2001en.log
gzip /tmp/2001.log
gzip /tmp/2001en.log
.. so this gives me manageable files to take down my 64K isdn line !
Can I pipe the result of the first command into the second ? or can I match
both terms in one ?
i.e. Give me all the lines that have "2001" and "GET /en/" in them ?
(Said he, polishing his newbie hat)
Thanks for all the suggestions folks,
Declan
[NODIS]
----- Original Message -----
From: "Dave Rynne"
>> Try something like:
> cat /logs/2001.log | perl -ne '/\/en\// && print'
> or:
> cat /logs/2001.log | perl -ne 'print if /\/en\//'
>> if you prefer..
>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!