[PLUG] managing squirrelmail under RH8
Russell Evans
russell-evans at uswest.net
Wed Feb 5 21:46:07 UTC 2003
rpm -qd , very nice. This is my attempt to make this easy for me to use. Any
ideas on how to make the menu more managable when the script finds a lot of
documents?
#!/bin/sh
if [ $1 ] ; then
WTHIT=$1
else
echo "usage: $0 pattern"
exit 1
fi
let x=0
for i in `rpm -qa | grep $WTHIT` ; do
DOC=`rpm -qd $i`
if [ x = 0 ] ; then
DOCS="$DOC"
let x=1
else
DOCS="$DOCS $DOC"
fi
done
PS3="Please select the menu number for the resource you wish to view #"
select RESOURCE in $DOCS ; do
if [ $RESOURCE ] ; then
if [ `echo $RESOURCE | grep man` ] ; then
man $RESOURCE
exit 0
elif [ `echo $RESOURCE | tr [:upper:] [:lower:] | grep html` ]
; then
links -g $RESOURCE
exit 0
elif [ $RESOURCE ] ; then
less $RESOURCE
exit 0
fi
else
echo "Invalid Selection"
fi
done
exit 0
I like links 2.1 instead of lynx but either should work.
Thank you
Russell
On Wed, 5 Feb 2003 18:28:14 -0800 (PST), Paul Heinlein said:
> rpm lets you query for documentation (assuming the packager designated
> it with a %doc macro):
>
> rpm -qd squirrelmail
More information about the PLUG
mailing list