TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:7607] sed help



Here's a horribly quick hack:

 echo "(sf-hiper1a-099.dialup.slip.net [216.185.29.99])" | \
sed -e s/"[A-Za-z0-9.( -]*\["//g -e s/"\][\)]*"//g

I didn't say it was pretty! 

pete

On Mon, 16 Aug 1999, Ben Luey wrote:

> Anyone want to donate a line of sed to the cause?
> 
> I want to transform the line:
> 
> (sf-hiper1a-099.dialup.slip.net [216.185.29.99])
> 
> to just the ip address (name or ip). 
> 
> Thanks,
> 
> Ben
> 
> 
> Ben Luey
> lueyb@carleton.edu
> ICQ: 19144397
> 
> Money is like manure--it only works if you spread it around.  -- Jim Hightower
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>