#!/usr/bin/env sh find man/*.md | \ while read i; do base=$(echo ${i} | cut -d '.' -f -2) pandoc ${i} -s -t man -o ${base} sed -i "s/VERSION_HERE/$(python3 -m lightcards -v)/g" ${base} done