LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2013, 08:55 PM   #1
Gregg.JS
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Rep: Reputation: Disabled
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
 
Old 12-29-2013, 09:27 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] case function for no-argument - default function for script? Batistuta_g_2000 Linux - Newbie 3 03-13-2013 10:00 AM
What is the function of this script ust Linux - Newbie 6 10-04-2012 04:56 AM
[SOLVED] Help with function in script Tiago85 Linux - Newbie 12 09-29-2012 12:46 PM
How to cd in a script function? subhrajyotibal Linux - Newbie 2 04-25-2008 01:52 AM
Function Level Hierarchy Mistro116@yahoo.com Programming 4 11-27-2005 04:30 PM


All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration