Skip to content

Instantly share code, notes, and snippets.

@rtrouton

rtrouton/tail-slack.sh Secret

Created Jul 6, 2018
Embed
What would you like to do?
#!/bin/bash
tail -n0 -F "$1" | while read LINE; do
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \
"payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment