you'll have to put the argument in a variable and pass it that way.

try this:

rpm -qa > x
set `head -n 1 x`
rpm -qi $1

the problem here is that it only gives you the info on the first package.
a better approach (if you want to see all packages) might be:

for package in `rpm -qa`
do
  rpm -qi $package
done

this will show them all at once.

[EMAIL PROTECTED] wrote:
> 
> I'm trying to learn scripting and getting rid of some unnecessary rpm
> packages at the same time here's what I'm doing
> 
> rpm -qa > x
> head -n 1 x | rpm -qi   this part dosen't work
> it gives an error of "rpm: no arguments given for query"
> 
> I've also tried
> 
> head -n 1 x > tmp
> rpm -qi < tmp             which give the same error as above
> 
> how do I pass info to rpm? using bash?
> 
-- 
Regards,
Jim Reimer - WA5RRH
[EMAIL PROTECTED]
http://www.webzone.net/jdreimer

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to