[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $? in the right side of a pipe
From: |
clemens fischer |
Subject: |
Re: $? in the right side of a pipe |
Date: |
Wed, 08 Dec 2010 15:51:11 -0000 |
User-agent: |
tin/1.9.6-20100313 ("Lochruan") (UNIX) (Linux/2.6.35.4-spott (i686)) |
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)
$ help :
:: :
Null command.
No effect; the command does nothing.
Exit Status:
Always succeeds.
My reading is this: ":" returns 0 and this would be the result of that
part of the chain.
clemens
- Re: $? in the right side of a pipe,
clemens fischer <=