On Sat, 14 Feb 2015, kamaraju kusumanchi wrote: > 1) How do I check if a newer version of a package is available from a > perl script?
I'm not sure there but my guess would be to use one of the CPAN modules related to APT, perhaps Linux::APT > 2) Generalizing the previous question, is there any way to get the > version number of the package to which it will be upgraded to had I > run "sudo apt-get install PACKAGE"? "apt-cache" would do that. For xterm, apt-cache policy xterm or something like this apt-cache policy xterm \ | awk '$1 == "Installed:" { installed = $2 } \ $1 == "Candidate:" { candidate = $2 } \ END { if ( installed < candidate ) { print candidate } \ else { print 0 } }' Regards, /Lars -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/alpine.bso.2.11.1502142202300.23...@yeeloong.dhcp.inet.fi