According to Eric Blake on 1/20/2010 6:01 AM:
>> 3.As you suggested(thanks)"check what arguments for exit() expr is giving"
>>
>> =Frankly i dont know how to check the same I will be thankful if you please
>> let me know the way to check the same
> 
> If you are on a Linux system, then 'strace expr $int_num + 1' will give
> you a (very verbose) dump of every system call, including which value
> exit() was called with.  In all likelihood, it will have been exit(0), in
> which case, if $? is corrupted, it is a bug in your shell and not in expr.

Another thing to try would be running your script under 'sh -vx script',
to get output of exactly what the shell is evaluating at the time.  In
fact, that might be easier to use than strace.  But whatever you do, trim
traces down to the relevant portion, rather than sending large logs to the
list.  And please consider attaching (not pasting inline) unmangled (and
not post-edited) source and output; your insistence on inserting * inside
snippets is making it hard to determine where your snippets start and end,
and draws into suspicion whether you are making a mistake where the script
ran something different than what your email shows.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             e...@byu.net

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to