Chinaunix

标题: TOOL=`which avr-gcc 2>/dev/null`怎么解释? [打印本页]

作者: sunmoonloong    时间: 2009-10-27 16:46
标题: TOOL=`which avr-gcc 2>/dev/null`怎么解释?
# Check if there's already a avr-gcc
TOOL=`which avr-gcc 2>/dev/null`;
if [ "${TOOL}" != "" ]; then
    echo "There's already a avr-gcc in ${TOOL},";
    echo "please remove it, as it will conflict";
    echo "with the build process!";
    exit 1;
fi;
作者: chenyx    时间: 2009-10-27 16:47
shell把两个·之间的命令结果返回给变量
作者: sunmoonloong    时间: 2009-10-27 16:57
能不能说得详细点,我很笨,初学者




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2