nunosempere.com/blog/_werc/traverse.sh

16 lines
279 B
Bash
Raw Normal View History

2023-05-15 16:46:16 +00:00
year="$1" ## bash traverse.sh 2019
2023-03-04 17:54:20 +00:00
echo "## In $year..."
echo
for dir in */*/*
do
index_path="$(pwd)/$dir/index.md"
title="$(cat $index_path | head -n 1)"
url="https://nunosempere.com/$year/$dir"
# echo $dir
# echo $index_path
# echo $title
echo "- [$title]($url)"
done