On 6/9/12 3:05 AM, Linda Walsh wrote:
> 

>> To sum up ". sdf2"  is returning 1
>> Bash considers . to be a simple command even though what's really
>> executed is [[ $# -ge 2 ]] && echo hello.
> ---
>     Right.... It's NOT a simple command.

To be clear: `.' is a shell builtin, with its own semantics and exit status:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_18

Like any other builtin, it's a simple command when executed as one.
And like any other builtin, if it returns a non-zero exit status when
errexit is enabled, the shell will exit.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/



Reply via email to