Is there some way to get bash into a sort of verbose mode where, such that, when it\'s running a shell script, it echoes out the command it\'s going to run before running it? T
For extra timestamps and I/O info, consider the annotate-output
command from Debian's devscripts package:
annotate-output echo hello
Output:
13:19:08 I: Started echo hello
13:19:08 O: hello
13:19:08 I: Finished with exitcode 0
Now look for a file that doesn't exist, and note the E: for STDERR output:
annotate-output ls nosuchfile
Output:
13:19:48 I: Started ls nosuchfile
13:19:48 E: ls: cannot access 'nosuchfile': No such file or directory
13:19:48 I: Finished with exitcode 2