Is it possible to write a command which runs my.sh and prints every path sourced or executed by this script recursively - That is, without altering the original code at all? The idea is to verify which files are actually used for a specific execution path, without time-consuming and error-prone manual tracing.For example:$ > my.sh cat <<'EOF'#!/bin/sh. ./foo.shEOF$ > foo.sh cat <<'EOF'#!/bin/sh./bar.shEOF$ > bar.sh cat <<'EOF'#!/bin/shecho barEOF$ chmod u+x my.sh bar.sh$ magic command[...]./my.sh./foo.sh./bar.sh
Wrapper script to list sourced/executed files
shell;trace