Created
April 23, 2014 23:48
-
-
Save jwerle/11236508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# redirect tcp to fifo | |
$ while true; do nc -l 6000 > fifo; done | |
# redirect fifo to cat and prefix with "> " | |
$ while true; do printf "> "; cat < fifo; done | |
> | |
# write to tcp | |
$ echo abc | nc localhost 6000 | |
$ echo 123 | nc localhost 6000 | |
# The fifo redirect to cat call will yield the following | |
> abc | |
> 123 | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment