httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject Re: cvs commit: apache-1.3 STATUS
Date Thu, 19 Mar 1998 21:54:10 GMT
On Tue, Mar 17, 1998 at 05:07:22PM +0100, Ralf S. Engelschall wrote:
> 
> <grins> Take this:
> 
> =============
> #!/bin/sh
> ##
> ##  fp2rp -- convert a standard forward path to a reverse dotted path
> ##           (used by ../Configure script)
> ##
> if [ "x$1" = x. ]; then
>     rp="."
> else
>     rp=""
>     for pe in `echo $1 | sed -e 's:/: :'`; do
>         rp="../$rp"
>     done
> fi
> echo $rp | sed -e 's:/$::'
> =============

Is that really
    for pe in `echo $1 | sed -e 's:/: :'`
and not
	      `echo $1 | sed -e 's:/: :g'`
? The former converts only the first occurrence?!

If the latter was intended, you can make it way faster by using
    for pe in `IFS="$IFS/"; echo $1`; do

No, I did not look at how the script is really used.
    Martin
-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message