[CentOS] Passing password to script for rpmsign of list of .rpm files

Sat May 21 07:43:38 UTC 2011
John R. Dennison <jrd at gerdesas.com>

On Sat, May 21, 2011 at 09:30:06AM +0200, Nicolas Thierry-Mieg wrote:
> Ljubomir Ljubojevic wrote:
> > for i in $(find . -type f | grep .rpm); do
> 
> > rpmsign --addsign `find . -type f | grep .rpm | grep -v .zzz`
> 
> just a small comment, grep uses regexps so this doesn't do what you want 
> (eg the . is a wildcard char). Your script can break, silently (won't 
> sign rpms whose name contains "any char followed by zzz") or not (will 
> attempt to rpmsign eg myrpms.pl), with some particular file names.
> 
> what you really want is files ending with .rpm, so:
> grep '\.rpm$'

Why are people passing this off to grep?

rpmsign --addsign $(find . -type f -name \*.rpm ! -name \*.zzz)

To be fair I've not read this entire thread so I may be missing
something here.




							John

-- 
Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20110521/b4f57be8/attachment-0005.sig>