#!/usr/local/bin/bash # Set the directory to search (replace with your actual path) TARGET_DIR="." # Function to process each .org file # Find all .org files recursively find "$TARGET_DIR" -type f -name "*.org" -exec emacs {} --batch -f org-html-export-to-html --kill \;