SED Help

Mike Vanecek rh_list at mm-vanecek.cc
Sun May 16 23:27:53 UTC 2004


Good eyes. Thank you. It works.

On Sun, 16 May 2004 23:37:21 +0800, Simon Tneoh Chee-Boon (Jaring Dialup) wrote
> How about the following with a space in front of SRC?
> sed -re 's/.* SRC=([0-9]+\.[0-9]+\.[0-9]+\.[0-9]).*/\1/'
> 
> Regards,
> Simon.
> --
> Simon Tneoh Chee-Boon     Gen-X Technology Sdn. Bhd.
> http://www.gen-x.com.my    http://www.tneoh.zoneit.com/simon/
> 
> ----- Original Message ----- 
> From: "Mike Vanecek" <rh_list at mm-vanecek.cc>
> To: "General Red Hat Linux discussion list" <redhat-list at redhat.com>
> Sent: Sunday, May 16, 2004 10:27 PM
> Subject: Re: SED Help
> 
> > > $ grep -i "`date '+%b %_d'`" packet.test2  | sed -re
> > > 's/.*SRC=([0-9]+\.[0-9]+\.[0-9]+\.[0-9]).*/\1/'
> > > 66.76.12.5
> > > 66.76.12.5
> > I thought it would pick up the first?  If I change the second SRC to SRX,
> then
> > it does pick up the first one.
> >
> > What do I need to specify to make it pick up the first one?
> 
> -- 
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list





More information about the redhat-list mailing list