|
Home > Archive > Red Hat Topics > February 2006 > Debug shell script
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Debug shell script
|
|
| csheppard91 2006-02-21, 8:45 pm |
| Hello everyone,
I am using RedHat Shrike 9.0. I am wondering how to debug shell script,
for example, step-by-step debug to watch the outputs of each line of
command.
Thanks in advance.
| |
| Mike Ingram 2006-02-22, 2:46 am |
|
"csheppard91" <csheppard91@gmail.com> wrote in message
news:1140568439.092196.6360@g14g2000cwa.googlegroups.com...
> Hello everyone,
>
>
> I am using RedHat Shrike 9.0. I am wondering how to debug shell script,
> for example, step-by-step debug to watch the outputs of each line of
> command.
>
> Thanks in advance.
>
Hi,
Normally, on the command line, type "sh -x scriptname"
Alternatively, in the script (line 1) add "set -x" and then run the script
Hope this helps.
Cheers.
|
|
|
|
|