From c1acbea2db9a3d7a61db2bc0073ac07ff65f8288 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Thu, 8 Mar 2018 02:46:47 +0100 Subject: [PATCH] reddit_karma_: fix shell quoting issues --- plugins/reddit_karma/reddit_karma_ | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/reddit_karma/reddit_karma_ b/plugins/reddit_karma/reddit_karma_ index b7389846..6d1d146e 100755 --- a/plugins/reddit_karma/reddit_karma_ +++ b/plugins/reddit_karma/reddit_karma_ @@ -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"