linux命令 查看某安装包是否已安装

版权声明:墨痕诉清风 https://blog.csdn.net/u012206617/article/details/85074949
if [ ! `rpm -qa | grep -n ^$i-[0-9].` ] ; then
    yum install -y $i
    [ $? -ne 0 ] && echo 'yum cannot install '$i && yum_right=3
fi

猜你喜欢

转载自blog.csdn.net/u012206617/article/details/85074949
今日推荐