From 97df7c4c38392739edec4309d31c42947597edfa Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 20 Sep 2018 12:19:36 -0400 Subject: Use here documents in feed.sh --- feed.sh | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/feed.sh b/feed.sh index 4a45ce45..3c6e6589 100755 --- a/feed.sh +++ b/feed.sh @@ -2,24 +2,28 @@ set -e -u updated=$(date -u '+%FT%TZ') -echo '' -echo '' -echo 'Causal Agency' -echo 'Junejune@causal.agency' -echo '' -echo 'https://text.causal.agency/' -echo "${updated}" +cat < + +Causal Agency +Junejune@causal.agency + +https://text.causal.agency/ +${updated} +EOF for entry in *.7; do url="https://text.causal.agency/${entry%.7}.txt" title=$(grep '^\.Nm' "$entry" | cut -c 5-) summary=$(grep '^\.Nd' "$entry" | cut -c 5-) updated=$(date -j -u -f '%s' "$(stat -f '%m' "$entry")" '+%FT%TZ') - echo '' - echo "${title}" - echo "${summary}" - echo "" - echo "${url}" - echo "${updated}" - echo '' + cat < + ${title} + ${summary} + + ${url} + ${updated} + +EOF done echo '' -- cgit 1.4.1