Re: How do you extract version from pacman?

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



Morris <lorimz@xxxxxxxxx> on Thu, 2012/07/26 11:24:
> On Thu, Jul 26, 2012 at 11:19 AM, Oon-Ee Ng <ngoonee.talk@xxxxxxxxx> 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?
> >
> 
> you could just use:
> $ pacman -Q virtualbox | awk '{print $2}'
> 4.1.18-4

Or the same with cut:

$ pacman -Q virtualbox | cut -d' ' -f2
4.1.18-4

Getting the complete package information is not required.
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux