coding virgin needs help please - once package pv is installed this code doing always does else
rather than then
. Why?
# First check if pv package is installed, if not, install it first
PACKAGESTATUS=`dpkg -s pv | grep Status`;
if [[ $PACKAGESTATUS == S* ]]
then
echo "Package 'pv' is installed."
else
echo "Package 'pv' is NOT installed."
echo "Installing package 'pv'. Please wait..."
apt-get -y install pv
fi
nb it is part of a backup script that backs up a raspberry pi running Raspbian wheezy raspbian/2013-02-09
and pv is version 1.2.0
and the author is unavailable.
Thanks.