#!/bin/bash mkdir test mkdir ../markdown libreoffice --headless --convert-to odt ../*.fodt --outdir test for file in test/*.odt; do filename=$(basename "$file" .odt) pandoc "$file" -o "../markdown/$filename.md" done rm -rf test