Skip to content

Commit

Permalink
Create RSSscript.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
x64bytes committed Jan 3, 2019
1 parent 0e81977 commit 31bcb6d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions RSSscript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
RSS_URL=https://aws.amazon.com/new/feed/
newsfeed=$(wget ${RSS_URL} -O - 2>/dev/null | xmlstarlet sel -t -m "/rss/channel/item" -n -v "title" -n -n)

echo "${newsfeed}" | while read line
do
curl -X POST "https://hooks.chime.aws/incomingwebhooks/tokencode" -H "Content-Type:application/json" --data "{\"Content\": \"$line\"}"
done

0 comments on commit 31bcb6d

Please sign in to comment.