shell中,我们可以通过简单的一个判断来判断命令是否存在
which "Command" > /dev/null
if [ $? -eq 0 ]
then
echo command is exist
else
echo command not exist
fi
shell中,我们可以通过简单的一个判断来判断命令是否存在
which "Command" > /dev/null
if [ $? -eq 0 ]
then
echo command is exist
else
echo command not exist
fi