Re: yum list available weird output

Seth Vidal <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>

On Tue, 5 May 2009, Gerry Reno wrote:

> Seth Vidal wrote:
>> 
>> 
>> On Tue, 5 May 2009, James Antill wrote:
>> 
>>> Gerry Reno <[email protected]> writes:
>>> 
>>>> I run this command:
>>>> yum -q list available $(rpm -qa --queryformat=%{name}\n) | grep "^ "
>>>> 1.0.0-2.fc11
>>>> preupgrade
>>>> 0.1.0-6.fc11
>>>> preupgrade
>>> 
>>> Pipe the "yum list available" output through less, and you'll see
>>> what is happening. In general we don't recommend screen scrapping yum
>>> output, writing a yum script is often significantly easier (and
>>> supported).
>>> 
>>> For what I _think_ you are trying to do above, you probably just want
>>> "yum list updates" or "yum check-update" output.
>> 
>> and if you feel you MUST use a script to do this: look at repoquery from 
>> yum-utils.
>> 
>> -sv
> Ok, through 'less' I can see that the output is being forced onto a second 
> line. But rather than do that, it would be better to just push the output out 
> by $COLUMNS and it would look exactly the same but still be on the same line.

did you see what I just said?

yum is NOT intended to be screen scraped. Either write a python script or 
use repoquery.

-sv
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.