Files
the_information_nexus/food_related/combine_md_files.sh
2024-05-01 18:24:38 -06:00

16 lines
440 B
Bash
Executable File

#!/bin/bash
# Create a "master" document
echo "# Master Document" > master_document.md
# Iterate over each .md file in the current directory
for file in *.md; do
# Skip the master_document.md file
if [[ $file != "master_document.md" ]]; then
# Append the content of each .md file to the master_document.md
echo "## $file" >> master_document.md
cat "$file" >> master_document.md
echo "" >> master_document.md
fi
done