检查是否存在wget/curl [英] Check for existence of wget/curl
本文介绍了检查是否存在wget/curl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试使用wget编写脚本来下载文件,如果Linux中不存在wget,则尝试卷曲.如何让脚本检查wget的存在?
Trying to do a script to download a file using wget, or curl if wget doesn't exist in Linux. How do I have the script check for existence of wget?
推荐答案
wget http://download/url/file 2>/dev/null || curl -O http://download/url/file
这篇关于检查是否存在wget/curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文