commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
connect to it with any network command (including web browser - if you don't mind weird formatting)
nc 127.0.0.1 9876
Then just nc servername 2600 and ./script.sh
kill the client with ctrl+c. You can reconnect several times.
kill the server with exit
One person does `mkfifo foo; script -f foo' and another can supervise real-time what is being done using `cat foo'.
uses fifo and sets to a specific port. In this case 4201.
Shorter version with proper stderr redirection .
Please check out my blog article on this for more detail. http://jdubb.net/blog/2009/08/07/monitor-wireshark-capture-real-time-on-remote-host-via-ssh/
USAGE: gate listening_port host port
Creates listening socket and connects to remote device at host:port. It uses pipes for connection between two sockets. Traffic which goes through pipes is wrote to stdout. I use it for debug network scripts.
Forwards localhost:1234 to machine:port, running all data through your chain of piped commands. The above command logs inbound and outbound traffic to two files.
Tip: replace tee with sed to manipulate the data in real time (use "sed -e 's/400 Bad Request/200 OK/'" to tweak a web server's responses ;-) Limitless possibilities.