aptitude versions \$(aptitude search ~iapache| awk '{print \$2}')
- So first I ran aptitude search for 'apache' term, but only among installed packages - aptitude search ~iapache
- From the results I cut package name (second column) - awk '{print \$2}'. Please note I escaped dollar character, because I run this command using Ansible (see this blog entry for more details).
- The outcome of those two command allows me to query package versions - aptitude versions
Links
- http://larryn.blogspot.co.uk/2012/01/some-time-ago-on-debian-mailing-list.html
- http://larryn.blogspot.co.uk/2015/04/the-cassandra-ansible-pipe-and.html