|
From: | Roman Rakus |
Subject: | Re: $? in the right side of a pipe |
Date: | Mon, 06 Sep 2010 10:50:45 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.1 |
On 09/05/2010 11:36 AM, Pierre Gaston wrote:
using the following: false; : | echo $? bash and ksh93 print 0 pdksh, dash and zsh print 1 It's not especially useful, but I'm wondering if there is any reason for this. (I would expect 1) Thanks Pierre
In bash, echo is run in the subshell. I'm not sure about the other shells. RR
[Prev in Thread] | Current Thread | [Next in Thread] |