if which command_name >/dev/null; then
echo "Command exists"
else
echo "Command does not exist"
fi
if command -v command_name >/dev/null; then
echo "Command exists"
else
echo "Command does not exist"
fi
06-03
488
01-04
675
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交