#!/bin/sh for FILE in `awk -F[{}] '/^\\\\input/ {print $2}' report.tex`; do source-highlight -n -f latex $FILE done