一个很方便的查询linux软件包的shell脚本
vim /root/rj.sh
#!/bin/bash
read -p "请输入你要查询的软件名称:" a
if [ `rpm -qa | grep $a | wc -l` -ne 0 ]
then
echo "yes"
else
echo "no"
fi
vim /root/rj.sh
#!/bin/bash
read -p "请输入你要查询的软件名称:" a
if [ `rpm -qa | grep $a | wc -l` -ne 0 ]
then
echo "yes"
else
echo "no"
fi