Use printf instead of echo in script

This commit is contained in:
dogeystamp 2022-06-08 20:20:15 -04:00
parent 02648a8552
commit 58c61cd3aa
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

2
ssg6
View File

@ -257,7 +257,7 @@ render_article_list() {
if echo $i | grep '^posts/' > /dev/null; then
DATE=$(cat $dst/$i | grep '<!--- date: .*-.*-.* --->' | cut -d ' ' -f 3-3)
url="$DATE;$i"
sorted_urls="$(echo -n "$sorted_urls\n$url" | sort -r)"
sorted_urls="$(printf "$sorted_urls\n$url" | sort -r)"
fi
done