Re: grep in cmd box

From: Ian Wilson (scobloke2_at_infotop.co.uk)
Date: 06/25/04

  • Next message: washer of kegs: "Re: Throwing out 5 boxes Sol 7 still wrapped"
    Date: Fri, 25 Jun 2004 19:49:43 +0000 (UTC)
    
    

    Bryan Dongray wrote:
    > Sorry...
    >
    > Bryan Dongray wrote:
    > > With perl you can do grep, eg:
    > > netstat | perl -n -e 'if ($_ =~ /80/) {print $_;}'
    > > would probably work.
    >
    > On a windows machine I tried this, but you need double quotes to
    > make it work on a command line - or put the script in a file
    > and call it from perl, eg "netstat | perl SCRIPT.PL"
    > where SCRIPT.PL would contain:
    > while ($l=<>) {
    > if ($l =~ /80/) {
    > print $l;
    > }
    > }
    > or similar.
    >

    netstat | perl -ne "print if /80/"


  • Next message: washer of kegs: "Re: Throwing out 5 boxes Sol 7 still wrapped"