[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [[/]] in shell conditionals (was: lvm on raid)



On Thu, Oct 28, 2004 at 10:17:40AM +0200, martin f krafft wrote:
> also sprach Colin Watson <cjwatson@debian.org> [2004.10.25.2043 +0200]:
> > You're on debian-boot at the moment. [[ ... ]] is a bashism, not
> > supported by busybox, and therefore useless in d-i.
> 
> As far as I can tell, [[/]] is POSIX 1003.2 syntax. Therefore, it's
> more like busybox cannot do POSIX.

The POSIX 1003.1-2001 shell specification merely says
(http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_04):

    The following words may be recognized as reserved words on some
    implementations (when none of the characters are quoted), causing
    unspecified results:

        [[  ]]  function   select

http://www.opengroup.org/austin/papers/posix_faq.html says that POSIX
1003.2 has been incorporated into POSIX 1003.1, and so POSIX.2 no longer
exists. The Scope section of 1003.1-2001 agrees.

How did you determine that this was POSIX shell?

-- 
Colin Watson                                       [cjwatson@debian.org]



Reply to: