Re: yum list display some package in 2 rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ambrogio <fn050202 interfree it> wrote:
I use yum list in a script to have everytime I need a list of package
available.

Some packages, that have long names, are displayed in 2 rows, so scripts
are more hard to be coded.

There is an option to have a more simple list of packages, less readable
by umans, but more readable by computer?

I also have "yum list available" in a script. All the regular lines begin with non-whitespace and all "additional" lines begin with whitespace, so I pipe it through the following:

tr "\n" "#" | sed -e 's/# / /g' | tr "#" "\n"

Turn newlines into octothorpes; replace octothorpe+space with space globally (i.e., delete the octothorpe if it's followed by a space); replace octothorpes with newlines. It's predicated on the assumption that there would never be an octothorpe in a yum listing. If there ever is, then I'd have to pick another character.

It's a hack, but it works (so far).

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux