[m-dev.] diff: fix for generate_index_html
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Jun 27 14:56:53 AEST 2000
On 27-Jun-2000, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> +++ generate_index_html 2000/06/27 04:29:11
> @@ -26,7 +26,7 @@
>
> for file in *
> do
> - if [ $file != index.html ] && [ $file != README ]
> + if [ `expr $file : index\.html` -ne 10 ] && [ $file != README ]
> then
...
fi
For future reference (it's not particularly important in this
instance), as a style issue I would generally write that using
`case'
case $file in
README|index.html*) ... ;;
*) ... ;;
esac
rather than `expr'. I think `case' is slightly more readable
in this case, and in general it can be more efficient,
since `expr' is normally a separate process while `case'
is a shell built-in.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list