From: Alfie Costa (agcosta@gis.net)
Date: Sun Apr 29 2001 - 11:31:04 CEST
On 28 Apr 2001, at 20:05, Clive Wright <mulinux@sunsite.dk> wrote:
> On examining the quark script I believe that line #231,
That's line #221 in my copy of /usr/quark/quark (6346 bytes).
> page=`echo $URL| sed s/^.*${host_spec}//`
>
> is the cause of the problem but my limited knowledge of
> regular expressions has prevented me from effecting a cure.
It is a good puzzle. I searched usenet, but couldn't find a 'sed' one-liner to
replace only the first instance of a string; or at least not one that works in
'mu'. However...
Line #221 is inside a case loop, and is only called if the first letters of
$URL are "http:". It should be OK to do:
page=`echo $URL| sed s/^http:\\\/\\\/${host_spec}//`
Or (shorter yet microscopically more wasteful of CPUs):
page=`echo $URL| sed s/^http:..${host_spec}//`
Both worked when tested from the command line.
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:18 CET