How to make output of any shell command unbuffered?

后端 未结 4 1983
天命终不由人
天命终不由人 2020-11-22 16:25

Is there a way to run shell commands without output buffering?

For example, hexdump file | ./my_script will only pass input from hexdump to my_script in

4条回答
  •  无人及你
    2020-11-22 17:08

    The command unbuffer from the expect package disables the output buffering:
    Ubuntu Manpage: unbuffer - unbuffer output

    Example usage:

    unbuffer hexdump file | ./my_script

提交回复
热议问题