开发者

Preserving 'ls' output format over network

I have 2 machines A and B.

I wish to have the output from B printed in a terminal on A.

I run the following in a loop on A:

nc -l -p 65000

On B, 开发者_StackOverflowall output is tee'd to /dev/tcp/A/65000

This works most of the time, but output from programs such as 'ls' lose their colour and tab formatting. Is there any way to get this to work, such as by writing directly to the tty on A? How would I do this?

Thanks.


You need to use something like unbuffer to fool the program into thinking that it's connected to a tty.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜