[arch-general] How do you extract version from pacman?

Auguste Pop auguste at gmail.com
Fri Jul 27 01:57:53 EDT 2012


On Thu, Jul 26, 2012 at 5:19 PM, Oon-Ee Ng <ngoonee.talk at gmail.com> wrote:
> With the new virtualbox update I had to obtain virtualbox version in a
> script (and of course, virtualbox binary doesn't have a sane --version
> parameter...).
>
> Anyway, its pretty simple to pacman -Qi virtualbox | grep -e
> "^Version" | awk '{print $3}' | sed 's|-.||'
>
> Perhaps it may be nice to have a pacman flag to obtain just the
> version string. I'll file a feature request, but before that anyone
> has an comments on why it would be useless or a bad idea?

$ pacman -Q virtualbox
virtualbox 4.1.18-4
$ vboxmanage -v
4.1.18_OSEr78361


More information about the arch-general mailing list