[RndTbl] Help with pv?

Kevin McGregor kevin.a.mcgregor at gmail.com
Mon Dec 15 13:52:23 CST 2014


As a test I did this:
pv -c -N One </dev/zero | nc -b 65536 host1 10001
but all I get is
^[[45;1R
on the sending end and
^[[63;1R
on the listening end. And there it hangs. Both ends. This is after I set up
the terminal-type in Solaris. Cursor positioning? Why wouldn't it be
interpreted properly?


On Sat, Dec 13, 2014 at 12:42 AM, Adam Thompson <athompso at athompso.net>
wrote:
>
> Something Trevor said made me think of this:
>
> Host 2:
> (nc -l 10001 | pv -c -N one >/dev/null & nc -l 10002 | pv -c -N two
> >/dev/null & nc -l 10003 | pv -c -N three >/dev/null & nc -l 10004 | pv -c
> -N four >/dev/null)
>
> Host 1:
> ( pv -c -N one </dev/zero | nc host2 10001 & pv -c -N two </dev/zero | nc
> host2 10002 & pv -c -N three </dev/zero | nc host2 10003 & pv -c -N four
> </dev/zero | nc host2 10004 )
>
> As long as all the pv instances have the same controlling tty and process
> group, which is accomplished by putting the whole thing inside parentheses
> ( "(",")" ) the IPC stuff works correctly. It's designed for parts of a
> single pipeline yes, but this trick appears to fool pv adequately well.  At
> least on Linux and OpenBSD this works, not sure about Solaris.
>
> -Adam
>
> --
> -Adam Thompson
>  athompso at athompso.net
>  Cell: +1 204 291-7950
>  Fax: +1 204 489-6515
>
>
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.muug.mb.ca/pipermail/roundtable/attachments/20141215/935ab049/attachment.html>


More information about the Roundtable mailing list