sebastiano.tronto.net

Source files and build scripts for my personal website
git clone https://git.tronto.net/sebastiano.tronto.net
Download | Log | Files | Refs | README

commit 57a7db00ea956b6ee87ae3d6ae61ce21e9b62cf4
parent 0a57c9e5cfd9c59d2b6156c1afd050f55c3c21d9
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sat,  6 Dec 2025 19:18:01 +0100

Fixed script

Diffstat:
Msrc/blog/2025-11-29-aoc-download/aoc-download.md | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/blog/2025-11-29-aoc-download/aoc-download.md b/src/blog/2025-11-29-aoc-download/aoc-download.md @@ -100,7 +100,8 @@ url="https://adventofcode.com/$year/day/$daynozero" curl "$url" | sed -n '/<pre><code>/,/<\/code><\/pre>/ p' | (\ i=1 rm -f "code-$i.txt" - while read line; do + IFS='' + while read -r line; do if [ "$line" = "</code></pre>" ]; then i=$((i + 1)) rm -f "code-$i.txt" @@ -110,4 +111,3 @@ curl "$url" | sed -n '/<pre><code>/,/<\/code><\/pre>/ p' | (\ done ) ``` -