Révision c1acbea2
reddit_karma_: fix shell quoting issues
| plugins/reddit_karma/reddit_karma_ | ||
|---|---|---|
| 61 | 61 |
# Main |
| 62 | 62 |
## |
| 63 | 63 |
# Get current karma stats. |
| 64 |
link_karma=$(curl -s http://www.reddit.com/user/${reddit_user}/about.json | grep -Eo 'link_karma": [0-9]+' | cut -d' ' -f2)
|
|
| 65 |
comment_karma=$(curl -s http://www.reddit.com/user/${reddit_user}/about.json | grep -Eo 'comment_karma": [0-9]+' | cut -d' ' -f2)
|
|
| 64 |
about_user_url="http://www.reddit.com/user/${reddit_user}/about.json"
|
|
| 65 |
link_karma=$(curl -s "$about_user_url" | grep -Eo 'link_karma": [0-9]+' | cut -d' ' -f2) |
|
| 66 |
comment_karma=$(curl -s "$about_user_url" | grep -Eo 'comment_karma": [0-9]+' | cut -d' ' -f2) |
|
| 66 | 67 |
|
| 67 | 68 |
# Output karma stats. |
| 68 | 69 |
echo "link_karma.value $link_karma" |
Formats disponibles : Unified diff