Skip to content

Instantly share code, notes, and snippets.

@r2p2
Created May 30, 2013 13:58
Show Gist options
  • Save r2p2/5678028 to your computer and use it in GitHub Desktop.
Save r2p2/5678028 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /tmp/
mkfifo sendpipe
nc -l 1337 < sendpipe | while read request
do
echo "receive request: " $request
result = $(echo $request " * 2" | bc)
echo "send result " $result
echo $result > sendpipe
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment