shell常用指令 stdbuf、stderr与stdout

缓冲的类型分为三种:无缓冲、行缓冲、全缓冲。

stderr默认是无缓冲。

stdout的缓冲类型与输出介质有关:屏幕或者终端使用行缓冲,重定向文件、管道使用全缓冲。

stdbuf用于修改标准流的缓冲模式和大小。

#-i, --input=MODE
#adjust standard input stream buffering

#-o, --output=MODE
#adjust standard output stream buffering

#-e, --error=MODE
#adjust standard error stream buffering

stdbuf -i0 --o0 -e0 python ./build/build.py $@
#上面这条指令,设置input,output和error输出缓冲为0,让数据及时输出到下一级管道。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值