Re: Running a Script- and debugging.

On 09/22/2009 02:37 PM, suvayu ali wrote:
2009/9/22 Jim<mickeyboa@xxxxxxxxxxxxx>:
On 09/22/2009 12:07 PM, suvayu ali wrote:
2009/9/22 Jim<mickeyboa@xxxxxxxxxxxxx>:

On 09/22/2009 11:05 AM, Patrick O'Callaghan wrote:

On Tue, 2009-09-22 at 10:52 -0400, Jim wrote:


I have a script to run for setting up a Samsung CLX3175FN, when I start
it it hangs. and doesn't say why , how can I find why it hangs ?

I'm running it from the terminal as root.

If it's a Shell script (you don't say) try running it as "sh -x" or "sh -v".

Thanks Patrick for yor responds.
Using the sh -x command shows me to where it stopped.
What app. in Linux could I use that would show the line # and have the
a line in it.
The Console does not have a "find" command in it.
Prefer a app. that is not a command line app. I'm not very good at "vi"
some of the others.

What you can do is use,

$ grep -ne 'the command the script fails at' /path/to/script

This will give you the line number, then you can open it in any editor
and look it up. Since you mention you prefer something simpler, I'm
out of suggestions as I use Emacs and it is far from simple. However
if you still want to give that a try, then open emacs like this,

$ emacs +line_no /path/to/script

This will open the script with the cursor at line line_no. If you want
to turn on line numbers in emacs, do `Alt+x linum-mode<RET>'

I haven't tried this yet, but you could give bashdb a try. Sounds very

Name : bashdb
Arch : noarch
Thanks Suvayu it looks very impressive.
I ran the script I was having problems with and I have attached it.
I'm under the GUN here to get a Samsung CLX3175FN printer working, Samsung
has drivers for linux but they won't work in Fedora 11 .The
script is hanging up on me.

This sure is a nice printer.


Once you are at this prompt you can look at what are the values for
all the variables, exit codes and so on ... As I said, I haven't used
the package yet. So can't help you with the specifics. Try looking at
the man page for bashdb, that should have basic guidelines on how to
use it.


Could someone give me a Ideal as to this part of a script would hangup script.
In FC11.

The hangup stops at;

cd 'dirname $0'

# Script execution starts here }

# test "$1" != "STAGE_GUI_INSTALLER" -a "$1" != "STAGE_GUI_UNINSTALL" && date > /tmp/install.log

cd `dirname $0`
umask 022


if echo "$PARAMS" | grep -q -w -- -c ; then
exit 0
elif echo "$PARAMS" | grep -q -w -- -v ; then
exit 0

MODIFIER_ID_STRING="Inserted by Unified Linux Driver"

fedora-list mailing list
To unsubscribe: