NetBSD-Help archive

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

Re: MakeI(1): what means {} ?

Martin S. Weber wrote:
> a) behaviour of {}.
> {}, in contrast to the other shell wildcards "need not necessarily
> be used to describe existing files.". [...]
> b) {} doesn't just work :p (old basher, eh?)
> /bin/csh: echo a{b,c} -> ab ac
> /bin/sh: echo a{b,c} -> a{b,c}
> The {} pattern expansion is documented in ksh(1) and csh(1) btw, both
> the shells that support it (in contrast to sh(1)).

Thanks, Martin, I see.  It looks like a failure on the part of the manual
to communicate clearly and completely.  When I read the manpage, 

        "Targets and sources may contain the shell 
         wildcard values `?', `*', `[]', and `{}'." 

I assumed `{}' stood for the literal pair, as in find(1).  It's
exceedingly odd that it refers to "shell wildcards" when the shell's own
manpage doesn't use the term or in fact support the described behavior. 
FSVO "the shell", of course.  

I invoked the following Makefile from both bash and /bin/sh, 

                echo $@

and got the same results:

        $ make -f Makefile 
        echo tall
Since it doesn't use "the shell" to perform the expansion, it would be
better if it said what it *does* do, maybe by reference to glob(3)?  

As someone who arrived on the scene after csh's heyday, I dislike man
pages that say "like csh(1)", or, worse, assume "the shell" is csh(1) of
all things.  

Anyone else think this is doc fault?  


Home | Main Index | Thread Index | Old Index