2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

reddit_karma_: fix shell quoting issues

This commit is contained in:
Lars Kruse 2018-03-08 02:46:47 +01:00
parent 36c0717b95
commit c1acbea2db

View File

@ -61,8 +61,9 @@ fi
# Main
##
# Get current karma stats.
link_karma=$(curl -s http://www.reddit.com/user/${reddit_user}/about.json | grep -Eo 'link_karma": [0-9]+' | cut -d' ' -f2)
comment_karma=$(curl -s http://www.reddit.com/user/${reddit_user}/about.json | grep -Eo 'comment_karma": [0-9]+' | cut -d' ' -f2)
about_user_url="http://www.reddit.com/user/${reddit_user}/about.json"
link_karma=$(curl -s "$about_user_url" | grep -Eo 'link_karma": [0-9]+' | cut -d' ' -f2)
comment_karma=$(curl -s "$about_user_url" | grep -Eo 'comment_karma": [0-9]+' | cut -d' ' -f2)
# Output karma stats.
echo "link_karma.value $link_karma"