Package manager detection

Snippet for package manager detection

if [ $(rpm -qa 2>/dev/null | wc -l ) -gt 10 ]; then 
  system="rpm" 
elif [ $(dpkg -l 2>/dev/null | wc -l ) -gt 10 ]; then 
  system="dpkg" 
else 
  system="unk"
fi 
echo $system