Iterate over files and convert with a new name / directory
UUOC. pandoc takes the input file name as an argument. echo $file | pandoc -o outfile is equivalent to pandoc -o outfile $file. One process invocation down.
UUOS (sed in this case). bash has very rich string transformation features built in. For example, ${file%md} (see Parameter expansion section of man bash) will strip the md suffix form the filename. So consider

for file in *.md; do
    pandoc -o ../html/${file%md}html
done


Two more process invocations down.
If by any chance an .md filename contains funny characters (like whitespace), the substitution will produce unexpected results. It is safer to use double quotes, as in `"${....}".


PS: It might be beneficial to abandon the shell script altogether in favor of make, with a Makefile having a single stem rule

../html/%.html: %.md
    pandoc -o $@ $&lt;