Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ROOT_DIR="/path/to/text/files/you/just/made/"
- for year in "$ROOT_DIR"/*; do
- if [ -d "$year" ]; then
- for month in "$year"/*; do
- if [ -d "$month" ]; then
- cd "$month"
- for file in *.txt; do
- pandoc "$file" --pdf-engine=xelatex -o "${file%.txt}.pdf" && rm "$file"
- done
- cd "$ROOT_DIR"
- fi
- done
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment