diff options
author | Case Duckworth | 2022-07-26 13:14:39 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-26 13:14:39 -0500 |
commit | 70671addb39d6b590c25d46a5f6f0e62144c8d68 (patch) | |
tree | e57463ccba06b6ded9266299ffbb83613535cf90 | |
parent | *Actually* add feeds from elioat (diff) | |
download | sfeed-70671addb39d6b590c25d46a5f6f0e62144c8d68.tar.gz sfeed-70671addb39d6b590c25d46a5f6f0e62144c8d68.zip |
Fix awk bug
-rw-r--r-- | sfeedrc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sfeedrc b/sfeedrc index 7906cab..cfad5de 100644 --- a/sfeedrc +++ b/sfeedrc | |||
@@ -290,11 +290,11 @@ print | |||
290 | # something of the form `t3_xxxxx', where xxxxx can be glommed | 290 | # something of the form `t3_xxxxx', where xxxxx can be glommed |
291 | # into a URL to get to the comments. | 291 | # into a URL to get to the comments. |
292 | awk -v SUBREDDIT="$1" -v ALT=i.reddit.com \ | 292 | awk -v SUBREDDIT="$1" -v ALT=i.reddit.com \ |
293 | 'BEGIN {FS="\t";OFS="\t"} | 293 | 'BEGIN { FS="\t"; OFS="\t"; } |
294 | { $6 = $3 #ALT "/" SUBREDDIT "/" substr($6, 4) } | 294 | { $6 = $3 ALT "/" SUBREDDIT "/" substr($6, 4); } |
295 | { if (match($4,/<a href="([^"]*)">\[link\]<\/a>/,ln)) $3 = ln[1] } | 295 | { if (match($4,/<a href="([^"]*)">\[link\]<\/a>/,ln)) $3 = ln[1]; } |
296 | { gsub(/www\.reddit\.com/, ALT, $0) } | 296 | { gsub(/www\.reddit\.com/, ALT, $0); } |
297 | { print }' | 297 | { print; }' |
298 | ;; | 298 | ;; |
299 | 'Saturday Morning Breakfast Cereal') | 299 | 'Saturday Morning Breakfast Cereal') |
300 | sed 's@Saturday Morning Breakfast Cereal - @@' | 300 | sed 's@Saturday Morning Breakfast Cereal - @@' |