|
From: | Paul Jarc |
Subject: | Re: Declaring variables as local effects command status $? |
Date: | Fri, 06 Feb 2009 15:32:26 -0500 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Michael Rendell <michael@cs.mun.ca> wrote: > local x=$( echo hi; exit 20); > ret=$? Here you're getting the exit status of "local" itself, which is 0. If you want the exit status of the command substitution, make that a separate command: local x x=$( echo hi; exit 20); paul
[Prev in Thread] | Current Thread | [Next in Thread] |