User:Ikrustok

From ICO wiki
Revision as of 09:08, 12 May 2011 by Ikrustok (talk | contribs)
Jump to navigationJump to search

Quest lahendus 11 - Skript paki installi kontrolliks

#!/bin/bash
#Autor: Ivar Krustok A22, ikrustok@itcollege.ee
#Version: 2
#Skript paki installi kontrolliks
PAKK=$1
TARK=`/usr/bin/apt-cache policy $PAKK | grep Installed | awk '{print $2}'`
echo $TARK
if [ "$TARK" == "(none)" ]; then
        echo "0"
else
        echo "1"
fi