[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sheflug] command as argument for grep



 If ye
> want to have a crack before seeing my method, stop reading
> now, else scan
> past your paragraph ... :-)
>
Hmm, let me think.  I'll use this as my example then I'll do the next one on
my own ... ;0)

> Or you may need to escape the > in sed:
>
> 	sed -e 's/.*href=// -e 's/\>.*//' < input > output
>
> Chris...
>

I needed an extra ' after href=//

I'm presuming the -e bit just indicates "carry out the following" which
appears to be a reg exp substitution of what I didn't want with nothing
(//).  I'm assuming you can put as many -e's on a line as you want to.  I
was trying to pull out what I wanted rather than binning what I didn't want
and had got stuck.  Same result different method.  Cool thanks.

ChrisJ

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 16/01/2005


___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.