AdventOfCode2023/next_day.sh

10 lines
237 B
Bash
Raw Normal View History

2023-12-06 12:15:51 +01:00
#!/bin/bash
maxday=$(ls -d */ | sed -r 's|0*(.*)/|\1|g' | tail -1)
echo $maxday
nextday=$((maxday + 1))
nextday_dir=$(printf "%02d" $nextday)
echo $nextday
mkdir $nextday_dir
sed "s/X/$nextday/g" README.md.temp > $nextday_dir/README.md