1
能否请你解释这些表情对我说:将数据发送到日志文件 - shell脚本
cd - 1>> $LOG // Q - what 1 represent ?
./build_we2s all 1>> $LOG 2>> $LOG // Q - what 2 represent ?
能否请你解释这些表情对我说:将数据发送到日志文件 - shell脚本
cd - 1>> $LOG // Q - what 1 represent ?
./build_we2s all 1>> $LOG 2>> $LOG // Q - what 2 represent ?
1 stdout Standard output
2 stderr Standard error
cmd 1>> $LOG append stdout (only) to $LOG
cmd 1>> $LOG 2>>$LOG append stdout and stderr to $LOG
你可以做
cmd >> $LOG 2>&1
或
cmd &>>$LOG
太
1 => stdout。 2 => stderr。
它们是stdin &标准输出的默认文件描述符(fd)。