Skip to main content
corrected spelling, fixed grammar, improved formatting
Source Link

I am not sure if this is what you are trying to do:

nc -l -p 8096 -c second &
nc -c first 127.0.0.1 8096 &

This begins by opening a listening socket on port 8096, and once a connection is established, spawns program second with its stdinstdin as the stream output and stdoutstdout as the stream input. This is

Then, a second ncnc is launched which connectconnects to the listening port and spawnspawns program first with its stdoutstdout as the stream input and its stdinstdin as the stream output.

This is not exactly done using a pipe, but it seams doingseems to do what you need.

As this uses the network, this can be done on 2 remote computescomputers. This is almost the wasway a web server (second) and a web browser (first) work.

I am not sure if this is what you are trying to do:

nc -l -p 8096 -c second &
nc -c first 127.0.0.1 8096 &

This begins by opening a listening socket on port 8096, and once a connection is established, spawns program second with its stdin as the stream output and stdout as the stream input. This is

Then, a second nc is launched which connect to the listening port and spawn program first with its stdout as the stream input and its stdin as the stream output.

This is not exactly done using pipe, but it seams doing what you need.

As this uses the network, this can be done on 2 remote computes. This is almost the was a web server (second) and a web browser (first) work.

I am not sure if this is what you are trying to do:

nc -l -p 8096 -c second &
nc -c first 127.0.0.1 8096 &

This begins by opening a listening socket on port 8096, and once a connection is established, spawns program second with its stdin as the stream output and stdout as the stream input.

Then, a second nc is launched which connects to the listening port and spawns program first with its stdout as the stream input and its stdin as the stream output.

This is not exactly done using a pipe, but it seems to do what you need.

As this uses the network, this can be done on 2 remote computers. This is almost the way a web server (second) and a web browser (first) work.

Source Link
jfg956
  • 7k
  • 3
  • 24
  • 24

I am not sure if this is what you are trying to do:

nc -l -p 8096 -c second &
nc -c first 127.0.0.1 8096 &

This begins by opening a listening socket on port 8096, and once a connection is established, spawns program second with its stdin as the stream output and stdout as the stream input. This is

Then, a second nc is launched which connect to the listening port and spawn program first with its stdout as the stream input and its stdin as the stream output.

This is not exactly done using pipe, but it seams doing what you need.

As this uses the network, this can be done on 2 remote computes. This is almost the was a web server (second) and a web browser (first) work.