Mini-script: List the contents of a package

July 10, 2006 at 12:23 am | Posted in scripts, xubuntu | Leave a comment

If you’re like me, you don’t want to load up Synaptic to list the contents of a package. This script will let you do that quick and easily:

#!/bin/sh

# Check for dependencies
if [ -z "`which zenity`" ]; then
xmessage "zenity is required for this program."
exit;
else
SEARCH=`zenity --title "Search package files" --entry --text "Enter search term here:"`
fi
if [ "$SEARCH" ]; then
zenity --text-info --filename=/var/lib/dpkg/info/$SEARCH.list
fi

Save it under the filename list. Then run:

chmod +x list && sudo cp ./list /usr/bin/list && rm list

Enjoy!

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: