pinpe has asked for the wisdom of the Perl Monks concerning the following question:
and this is the output error:use Net::Telnet; @DATE=$telnet->cmd("date '+%Y-%m-%d'"); chomp($DATE[0]); @Discon=$telnet->cmd("cat /data/pinpe.csv | nawk '{print \$4}' | perl +-ne 'print if \$_ lt $DATE[0]'"); chomp($Discon[0]); print "@Discon[0]\n";
Now my dilemma is I want to filter this ouput by my preferred dates. I wanted it to output the date from yesterday and backwards. In other words I want to filter all the dates less than today's date (i.e. 2007-07-30, 2007-07-29, 2007-07-28, etc. and below). Tnx in advance. :) Was it perl thought that I was dealing with an octal number and when he came along with 8 which stopped it from making any sense, so perl quite rightly complained? Pls help. Tnx.Illegal octal digit '8' at -e line 1, at end of line
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: extract a log file to filter previous dates
by GrandFather (Saint) on Aug 02, 2007 at 22:22 UTC | |
by pinpe (Novice) on Aug 03, 2007 at 18:12 UTC | |
by GrandFather (Saint) on Aug 05, 2007 at 03:22 UTC | |
by pinpe (Novice) on Aug 03, 2007 at 18:36 UTC | |
|
Re: extract a log file to filter previous dates
by Fletch (Bishop) on Aug 03, 2007 at 00:50 UTC | |
by pinpe (Novice) on Aug 03, 2007 at 01:16 UTC |