On Tue, Sep 11, 2001, vivek khurana wrote:
>
> I want to know how can you debug a shell script, specifically
> i want to execute a shell script in step by step mode.
Is this a script written by you ? The simplest way is to insert
a read statement at the level that you want to stop and examine;
so that it waits for a [Return] before going to the next step:
e.g. ls -al /bla/bla*
read
file /bla/bla.1
> It will great if i can use some sort of debugger, actually i
> have written a shell script that invoke a program and when i
> run this script i get a segmentation fault.
Segmentation fault is never caused by your script. It would be
because of library incompatibilities (usually) in the binary
itself. Run the binary (program) directly outside the script to
find out ... It is unlikely that your problem will be sorted out
by stepping through your script even if you run under the
verbose execute mode (-vx) command line option.
Do a ldd of the binary and check for libs needed.
Bish.
--
:
####[ Linux One Stanza Tip (LOST) ]###########################
Sub : Recreating deleted /tmp LOST #006
To recreate an accidentally deleted /tmp, As root do :
#cd /
#mkdir tmp
#chmod 1777 tmp
#chown root.root tmp
[Note the period (.) between the two roots in last line]
####<[EMAIL PROTECTED]>###################################
:
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help