mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
reddit_karma_: fix shell quoting issues
This commit is contained in:
parent
36c0717b95
commit
c1acbea2db
1 changed files with 3 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue