[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Is there a way to automatically trace errors?
From: |
Peng Yu |
Subject: |
[Help-bash] Is there a way to automatically trace errors? |
Date: |
Sat, 21 Apr 2018 06:52:06 -0500 |
Hi, I have a large number of scripts that calls themselves. Here is
just a toy example.
==> script2.sh <==
#!/usr/bin/env bash
xxx
==> script1.sh <==
#!/usr/bin/env bash
./script2.sh
==> main.sh <==
#!/usr/bin/env bash
./script1.sh
When I run main.sh, I only get the error at the last step. But it
would be helpful to show the intermediate file script1.sh for easy
tracing. I don't want to make any changes in script1.sh (as in a real
case, the scripts may not be changeable.)
Is there an easy way to show the trace information? Thanks.
$ ./main.sh
./script2.sh: line 4: xxx: command not found
--
Regards,
Peng
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-bash] Is there a way to automatically trace errors?,
Peng Yu <=