Thank you, everyone. @ Marc: This is exactly what I was looking for. On Tuesday, September 7, 2021 at 9:26:24 PM UTC+2 ei...-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org wrote: > hello, > > > for f in "/users/myname/desktop/test/input/"*.md; \ > > do \ > > pandoc "$f" \ > > --standalone \ > > -o "/users/myname/desktop/test/output/"${f%.md}.htm; \ > > done > > close :) this should do the trick: > > base=/users/myname/desktop/test > pushd $base/input > for f in *.md ; do > pandoc "$f" -s -o $base/output/${f.md}.htm > done > popd > > if you use zsh and don't care about a subshell, i would have writen > > ( base=/users/myname/desktop/test > cd $base/input > for f (*.md) pandoc "$f" -s -o $base/output/$f:r.htm ) > > however i would like to mention make as a better solution: > > * a makefile to do the same job will be > > BASE = /users/myname/desktop/test > SRCS != ls ${BASE}/input/*.md > PAGES = ${SRCS:${BASE}/input/%.md=${BASE}/output/%.htm} > all : ${PAGES} > ${BASE}/output/%.htm: ${BASE}/input/%.md > pandoc -s -o $@ $< > clean:; rm -rf ${BASE}/o/* > > * you can just type > > make # build the missing pages one by one > make -j4 # build the missing pages four by four > make -b # rebuild every pages > make clean # remove all the pages > > regards > marc > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0d4acc1e-9566-4d61-8c55-57055b19ae0en%40googlegroups.com.