Skip to content

Instantly share code, notes, and snippets.

@2xlink
Last active March 27, 2018 16:06
Show Gist options
  • Save 2xlink/8f508d47644a6b97dc0f35d08ccd9224 to your computer and use it in GitHub Desktop.
Save 2xlink/8f508d47644a6b97dc0f35d08ccd9224 to your computer and use it in GitHub Desktop.
#!/bin/bash
# This script takes your chat and posts it to a webserver.
# Finally a chat protocol everyone can use!
if [[ -z $1 ]]; then
echo "First parameter must be the host!"
exit 1
fi
HOST=$1
while read -r line
do
curl -s "$HOST/$line" > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment