Due to the dynamic nature of the shell, you cannot do this without running a script.
For example:
TASK="cc foo.c" time $TASK
It will be very difficult to determine without starting up that cc was called even in such a trivial example as above.
At runtime, you can check the debug output of sh -x myscript , as indicated by titon (+1) and ks1322 (+1). You can also use the strace tool to find all exec() system calls.
MichaΕ Ε rajer
source share