Linux基础—Shell脚本 ### “$?”来显示上一条命令执行的返回值,如果为0则代表执行成功,其他表示失败。 if [ $? -ne 0 ]; then echo "failed" else echo <