[arch-general] Wrapper for yaourt and pacman

William Giokas 1007380 at gmail.com
Sat Jul 13 19:39:52 EDT 2013

On Sat, Jul 13, 2013 at 11:16:25PM +0200, Ralf Mardorf wrote:
> Hi,
> to write a wrapper for yaourt, e.g. "yaourt -Syua" and pacman e.g.
> "pacman -Syu" I need to redirect the output to a variable, since I need
> to know the packages.

First off, I'm not a huge fan of yaourt, and would advise against using
it at all.

> i=`yaourt -Syua` doesn't work, $i only contains the last package
> i=`pacman -Syu`  does work, $i contains all packages
This second one seems to be what you want...unless you're saying it
shows every package available. 

> How can I get a package list of the output "-Syua"?

Using the conveniently written pacman logs. You can even put them into
your journal and use 'journalctl _COMM=pacman --since=<time of last check>'.
Yes, it's not going to get the whole output, but it will tell you every
package that was installed, upgraded, downgraded, or removed and at what

William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20130713/2d626859/attachment-0001.asc>

More information about the arch-general mailing list