Introduction
Introduction Statistics Contact Development Disclaimer Help
sfeed_markread: for the unread comment: create the file if it does not exist - …
git clone git://git.codemadness.org/sfeed_curses
Log
Files
Refs
README
LICENSE
---
commit 84529dc8f6cdca8c83c7cb22e1c7d09aa2a0cbf6
parent 82e0cbb1afd2fff9654d1f0decff921537932038
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 24 Jul 2021 22:38:55 +0200
sfeed_markread: for the unread comment: create the file if it does not exist
...otherwise awk would error out and print an error message.
Diffstat:
M sfeed_markread | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/sfeed_markread b/sfeed_markread
@@ -11,7 +11,8 @@ read)
cat >> "$SFEED_URL_FILE";;
unread)
tmp=$(mktemp)
- trap "rm -f $tmp" EXIT
+ trap "rm -f ${tmp}" EXIT
+ test -f "${urlfile}" || touch "${urlfile}" 2>/dev/null
LC_CTYPE=C awk -F '\t' '
{ FILENR += (FNR == 1) }
FILENR == 1 { urls[$0] = 1 }
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.