Msh has a trace mode in which we try to record a majority of side-effects that the shell makes. $ cat >test.sh < f () { > echo world > world.txt > } > f > echo hello > hello.txt > cat < hello.txt > EOF $ msh -t test.sh hello $ cat msh-trace.csv [msh read cat, msh read ./hello.txt, msh read IFS, msh read IFS, msh wrote to ./hello.txt, msh read IFS, msh read IFS, msh read IFS, msh wrote to ./world.txt, msh read IFS, msh read IFS, msh read IFS, msh read f, msh read IFS]