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.
精彩评论