Re: grep in cmd box
From: Ian Wilson (scobloke2_at_infotop.co.uk)
Date: 06/25/04
- Previous message: Paul D. Smith: "Re: GNU Make"
- In reply to: Bryan Dongray: "Re: grep in cmd box"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/"
- Previous message: Paul D. Smith: "Re: GNU Make"
- In reply to: Bryan Dongray: "Re: grep in cmd box"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]