Ronan Keryell wrote: > Package: dash > Version: 0.5.4-11 > Severity: normal > > I've found a problem on machines with dash used as default shell. > > In the following toy program: > > #! /bin/dash > > # OK ls is not found > PATH=/nowhere ls > > # The dash superpower: the following should failed but works on dash! > PATH=/nowhere type ls > > PATH=/nowhere > type ls > > ls >
I am neither the maintainer nor upstream but IMHO as the 'type' built-in is neither required by POSIX nor SUSv3 nor Debian Policy it should be considered implementation-dependent invalidating this bug (but could be a wishlist). Actually, this report is also invalid because relying on /bin/sh providing such a built-in is a policy violation; and if the script has a #!/bin/dash shebang it wouldn't be a bug either because that's they way how dash implements it :) > > If you try with #! /bin/bash the behaviour is correct. Complementing what I just said, could you please point to a written description of what the "correct behaviour" should/must be? > > For information, this issue happens in a script invoking the PIPS > source-to-source compiler ( http://www.cri.ensmp.fr/people/pips/ ) : > > # Avoid a recursion if no actual binary is found: > PATH=./${PIPS_ARCH}:${PIPS_ROOT}/bin/${PIPS_ARCH} \ > type ${what} > /dev/null || error 3 "no ${what} binary found!" And to avoid being pedantic I'll give you a hint: use which instead of type :). Cheers, -- Atomo64 - Raphael Please avoid sending me Word, PowerPoint or Excel attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

