Re: Wildcard bug or feature?

Garrick Staples <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
On Fri, Mar 23, 2007 at 12:53:05PM -0400, Steve Brown alleged:
> Hi,
> 
> Due to disk space constraints on my notebook, I was unable to update 435 
> applications all at once.  Wanting to do my updates in smaller batches, 
> I tried 'yum update apr-*' and was happy to find that I could use 
> wildcards to specify smaller groups of applications to update.  Next, I 
> tried 'yum update a* b* c* d*' figuring I would do four letters of the 
> alphabet at a time.  The prompt said I would only be updating 2 
> applications, though I know from my 'yum list updates' list that there 
> are many more applications to be updated beginning with those letters.
> 
> Next, I tried 'yum update a*' and noticed that there were may lines 
> saying there was no match followed by the name of a file that started 
> with 'a' that was in the current directory.  When I moved into an empty 
> subdirectory and ran 'yum update a*', it ran exactly as I had hoped.
> 
> If this is a bug, please fix it.  If it's a feature, please explain.
> 
> By the way, something like 'yum -n ## update' where ## is the number of 
> applications to update would be helpful in this situation, or better 
> yet, have yum clean up after itself every ## updates.

Neither a bug or feature of yum.  This is just normal glob expansion by
your shell before executing commands.

You need to escape the shell metacharacters with quotes or backslashes
when passing them to commands.

  yum update 'a*' 'b*' 'c*' 'd*'
  yum update a\* b\* c\* d\*

Or you could, assuming you are using bash, turn off globbing while you
do this:

  set -f
  yum update a* b* c* d*
  ...
  set +f

-- 
Garrick Staples, GNU/Linux HPCC SysAdmin
University of Southern California

_______________________________________________
Yum mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFGBAvE0SBUxJbm9HMRAldwAJ9G6T0sFwlnDG/dvtlev9JOWHQWMQCgv1qT
0DVI1uxhoaN3uR6ix7Reybo=
=92KI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.