Projet

Général

Profil

Révision c1acbea2

IDc1acbea2db9a3d7a61db2bc0073ac07ff65f8288
Parent 36c0717b
Enfant 27773039

Ajouté par Lars Kruse il y a plus de 7 ans

reddit_karma_: fix shell quoting issues

Voir les différences:

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