Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15038
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Vladimir Marek <Vladimir.Marek@oracle.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: [IDEA] more granular shell options to fix errexit |
| Date | Thu, 3 Jan 2019 17:46:31 +0100 |
| Lines | 33 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.6729.1546534006.1284.bug-bash@gnu.org> (permalink) |
| References | <00c8e3c7-1dd2-1154-da89-a31e1a6fb515@mail.mipt.ru> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| X-Trace | usenet.stanford.edu 1546534006 25336 208.118.235.17 (3 Jan 2019 16:46:46 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash <bug-bash@gnu.org> |
| To | Ivan Pozdeev <vano@mail.mipt.ru> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=A/4VJp/jKQ9d7LH6Mgf/dAFd9q+R2aBLMwgn4/ns7t8=; b=eauQracfLMvGe/6eANcVat6JWcpgdPoOMJ1u9EZHCbmD+Pb6pThn3INa+KX+ymQqSeGZ i8ZgYGk8GqVgZ9LlwDMdbM2wUS8SqG/LoE8UC2dZICh4p1GqHfkoC1oIJUPUAZFoSgWq Be582dePsdLM81iTUtX722HGViuKq1dl7VAVxmPUNqWzMc2c77HYUgpZwQJ/f7aRSISd KvrByjssUgwgMpwjIG3N+XOqcHc426nfoybaoUq+6drRCVbhuwEJN6msIN/URguq9Aj4 wKDqlhDjRy5J799o3J+0gPR49UKM10yDPrNbnInjdHiUFVTE1k8KpznFEHcKSFpJ/aA2 AQ== |
| Content-Disposition | inline |
| In-Reply-To | <00c8e3c7-1dd2-1154-da89-a31e1a6fb515@mail.mipt.ru> |
| User-Agent | Mutt/1.5.22.1-rc1 (2013-10-16) |
| X-Proofpoint-Virus-Version | vendor=nai engine=5900 definitions=9124 signatures=668680 |
| X-Proofpoint-Spam-Details | rule=notspam policy=default score=0 suspectscore=18 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=887 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901030148 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] |
| X-Received-From | 141.146.126.79 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:15038 |
Show key headers only | View raw
Hi, [...] > The following suggested options aim to eliminate all cases that still exist, > outlined on the above link, where an exit code of a command is > swallowed/ignored. [...] My take on this, purely from user's point of view is to be able to instruct bash to exit any time any command returns non-zero value unless the situation is handled in the code. That means inside of if command; then ... or command || blah So what you suggested is something I would like to use. If I would to have command which does not terminate command || : If I want to catch the return value command && RET=$? || RET=$? OUT=$(command) && RET=$? || RET=$? Cheers -- Vlad
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: [IDEA] more granular shell options to fix errexit Vladimir Marek <Vladimir.Marek@oracle.com> - 2019-01-03 17:46 +0100
csiph-web