[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exit status question
From: |
Eric Blake |
Subject: |
Re: exit status question |
Date: |
Mon, 20 Dec 2010 11:30:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 12/20/2010 11:25 AM, Curtis Doty wrote:
> Not exactly sure if this is a bug. But I don't understand why only the
> first time running ((i++)) returns an error exit status.
Because it follows the same semantics as 'expr', where status 1 is
reserved for a successful run with value 0, and status 2 and above are
reserved for errors. This was just brought up on the list earlier this
month:
http://lists.gnu.org/archive/html/bug-bash/2010-12/msg00087.html
and seems to be a recurring question:
http://lists.gnu.org/archive/html/bug-bash/2010-07/msg00121.html
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature