I take notes using markdown, and save them in the following structure
$NOTESDIR
- preface.md
- styling.tex
+ YR1
+ sem1
- "LinAlgDat - Transformations and matrices.md"
+ sem2
- "PoP - something fancy.md"
+ YR2
+ sem3
+ ...
+ YR3
+ ...
+ sem6
And I'm working on a script to compile either semesters to pdfs, or entire years to pdfs using pandoc
pandoc --toc -o "${1}.pdf" "$NOTESDIR/preface.md" $2 &&
echo "Compiling ${1}.pdf"
Now, to feed all the files names to the command, I have to sort them. I want to sort them either by course (LinAlgDat, PoP) or by date (all note files contains a line with "> Date: DD-MM-YY". I can easily use "ack" to get all the files, but I haven't found a solution for sorting the output of ack.