From 70671addb39d6b590c25d46a5f6f0e62144c8d68 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 26 Jul 2022 13:14:39 -0500 Subject: Fix awk bug --- sfeedrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sfeedrc b/sfeedrc index 7906cab..cfad5de 100644 --- a/sfeedrc +++ b/sfeedrc @@ -290,11 +290,11 @@ print # something of the form `t3_xxxxx', where xxxxx can be glommed # into a URL to get to the comments. awk -v SUBREDDIT="$1" -v ALT=i.reddit.com \ - 'BEGIN {FS="\t";OFS="\t"} -{ $6 = $3 #ALT "/" SUBREDDIT "/" substr($6, 4) } -{ if (match($4,/\[link\]<\/a>/,ln)) $3 = ln[1] } -{ gsub(/www\.reddit\.com/, ALT, $0) } -{ print }' + 'BEGIN { FS="\t"; OFS="\t"; } + { $6 = $3 ALT "/" SUBREDDIT "/" substr($6, 4); } + { if (match($4,/\[link\]<\/a>/,ln)) $3 = ln[1]; } + { gsub(/www\.reddit\.com/, ALT, $0); } + { print; }' ;; 'Saturday Morning Breakfast Cereal') sed 's@Saturday Morning Breakfast Cereal - @@' -- cgit 1.4.1-21-gabe81