Created
August 4, 2015 16:34
-
-
Save saxbophone/7e266e074c28a3d31706 to your computer and use it in GitHub Desktop.
Fake Server - could-be one-liner in bash
This file contains hidden or 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
| fake_server() { | |
| # function that takes port to listen on as first argument, file to read from as second | |
| # perpetually listens on given port and outputs the contents of given file on connections | |
| while true; do nc -l $1 < $2; done; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment