On Fri, Dec 14, 2007 at 11:44:37AM -0800, Ralph Shumaker wrote:
> I also tried:
> yum whatprovides */g++
> (without quotes) getting identical results, as well as:
> yum whatprovides *g++*
> yum whatprovides '*g++*'
> yum whatprovides '*g++'
> yum whatprovides *g++
> each of which provide more false positive matches.  I don't know the
> purpose of the quotes, but at least in this case (in my bash shell),
> the quotes didn't seem to make a difference in any of the combinations
> I tried.

In Bash (I can't really speak as well to other shells), the wildcard
globbing only happens if files actually match the glob.  Quoting the
wildcard will prevent globbing, even if a file would match.  I typically
always escape my wildcards, so I don't have to check first if one or
more files would match.

    $ touch foobar
    $ ls foobar
    foobar
    $ echo foo*
    foobar
    $ echo 'foo*'
    foo*
    $ rm foobar
    $ echo foo*
    foo*

If I had some file in my directory, let's say
packages.i.found.which.match.g++, and I ran an unescaped yum command:

    $ yum provides *g++

The command would then actually be,

    $ yum provides packages.i.found.which.match.g++

Which probably isn't what I want.

Attachment: pgprrfUQMSib9.pgp
Description: PGP signature

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to