Linux shell IF judgment report not found error solution

It turns out that if judges that there is a pit, if space [ space $? -eq 0 space ]; space is added after if, and spaces must be added on both sides of the condition. The following are examples of numerical comparison and string comparison
---------number
if [ 1 -eq 2 ];then
be

--------string
if [ 'a' = 'v' ];then
be


Reference:
http://www.w2bc.com/Article/17610

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326537047&siteId=291194637