How to trick an application into thinking its stdout is a terminal, not a pipe

前端 未结 9 1616
梦如初夏
梦如初夏 2020-11-22 11:58

I\'m trying to do the opposite of \"Detect if stdin is a terminal or pipe?\".

I\'m running an application that\'s changing its output format because it detects a pip

9条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 12:32

    The unbuffer script that comes with Expect should handle this ok. If not, the application may be looking at something other than what its output is connected to, eg. what the TERM environment variable is set to.

提交回复
热议问题