For a long time I've been using an alias to shortcut the usage of apt-get show
, but I wasn't happy with it. So today
I've written a new script that shows a description of the programme you're interested in, and then shows whether you've
already installed it, and what repo its in, and saves it to a log file. So here it is -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/bin/bash
#: Title : show
#: Date : November 2013
#: Author : Sharon Kimble
#: Version : 2.0
#: Times edited : 09
#: Description : to easily show a description of a programme
#: Options : 1, all listed in variables
#: License : GNU GPL 3.0 or later
####################################################
# Changelog.
# * 10-11-13
# initial version of the script
# logs output.
####################################################
# Variables
logfile="/home/boudiccas/logs/show.txt"
####################################################
exec > >(tee -a $logfile) 2>&1
echo "What programme do you want to see?"
read programme
apt-cache show "$programme" | grep -i description -A 8
apt-cache policy "$programme" #shows whether installed or not, and repo of it.
|
Just save it to your /home/$user/bin/
, restart your terminal, and use your new command from the command-line. It
also logs everything that it displays to 'show.txt' in your ~/logs directory, for any further examination of the
programme. Enjoy :)
Comments
comments powered by Disqus