LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script function hierarchy (https://www.linuxquestions.org/questions/linux-newbie-8/script-function-hierarchy-4175489519/)

Gregg.JS 12-29-2013 08:55 PM

Script function hierarchy
 
Dear experts,

Is there any way to view the call hierarchy for a /bin/sh script? Something like this might be useful to understand general flow. And also to know whether a function is being used or not.

Thank you,
Gregg.JS

shivaa 12-29-2013 09:27 PM

It would be better if you can explain the question little more. However, you can run your script by adding set -vx (v stands for verbose, x for execution) debugging tool, so you can see every step of running script. To do this, just add it as:
Code:

#!/bin/sh
set -vx
.
.
Script content
.
.

Also check:
http://tldp.org/LDP/Bash-Beginners-G...ect_02_03.html
http://www.computerhope.com/unix/uset.htm


All times are GMT -5. The time now is 11:37 AM.