I am trying to debug a complicated bash script.
Rather than run the script, I'd like to have its commands sent to a text file where I can view them. Any ideas on how this is done? I've messed with 2>&1 1>file.txt but that's redirecting the output of commands. I need to actually capture the commands that are run and save those.
EXAMPLE:
#!/bin/sh
ls
date
---end file----
I want to capture as output
"ls
date"
not the actualy 'ls' and 'date' output.
Thx.
Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
Rather than run the script, I'd like to have its commands sent to a text file where I can view them. Any ideas on how this is done? I've messed with 2>&1 1>file.txt but that's redirecting the output of commands. I need to actually capture the commands that are run and save those.
EXAMPLE:
#!/bin/sh
ls
date
---end file----
I want to capture as output
"ls
date"
not the actualy 'ls' and 'date' output.
Thx.
Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.