commit fd83f17fab6afefa04c18b6e8f2938b916b9d008
parent 1d4661b2bad4cbf548b70d58ef36cd8eadae5978
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 26 Apr 2020 11:09:55 +0200
Avoid appending to preexisting files
Previously, multiple md2point calls required manually removing
output text files between calls as content was always appended to
the output file. This is no longer the case with this commit, as
output files are cleared on first write.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/md2point b/bin/md2point
@@ -27,7 +27,7 @@ do
fname="$(mkfilename "$snum" "$title")"
snum=$((snum + 1))
printf "\n %s\n %s\n\n" \
- "$title" "$(mkunderline $titlelen "=")" >> $fname
+ "$title" "$(mkunderline $titlelen "=")" > $fname
;;
\#pause)
fname="$(mkfilename "$snum" "$title")"