|
Posted by dummy on June 6, 2008, 7:13 pm
Please log in for more thread options On Thu, 5 Jun 2008 09:09:12 -0700 (PDT), Ray Muforosky
>assuming fileA contain the data below could help with this
>
>perl -lane '$l=$_, ($a,$b,$c,$d)= split(/\./,$F[0]),print $d' fileA
>
>fileA
>===
> 192.68.45.718 daskjaskjf asdfjkasjf asfkasfklh
> 192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
> 192.68.23 INEED HELP PLEASE
> 192.68.67.4 dkasdfkl kasfkasfkakf
> 192.68.4.97 flaskfk asfkfafv asf
>
>How do I modify the command line code above to get this below : print
>lines where the last quadrant is even
>
>123.68.45.718 daskjaskjf asdfjkasjf asfkasfklh
>192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
>192.68.67.4 dkasdfkl kasfkasfkakf
>
>
>Thanks
>Any other ideas will be appreciated.
perl -ne "print if /(\d+\.)\d[02468]\s/" FileA.txt
|