echo "FIGS=\\" for f in *.tex do echo "${f%\.tex}.png \\" echo "${f%\.tex}2x.png \\" done echo