bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: expr exit status


From: Eric Blake
Subject: Re: expr exit status
Date: Wed, 20 Jan 2010 06:11:58 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

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             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]