On Monday 18 March 2013 14:17:42 Joshua Judson Rosen wrote:
> `luckily', the other popular bourne shells (e.g.: bash, dash/ash, ksh) seem
> to all actually behave contrary to POSIX on this matter; portable scripts
> already have to do ". $file || exit" if they actually want the POSIX
> behaviour....

eh ?  have you actually tried running those shells ?

looks like dash follows POSIX:
        $ dash -c '. asdlfjasdlkfj || echo fail; echo hi'
        dash: 1: .: asdlfjasdlkfj: not found

ksh too:
        $  ksh -c '. asdlfjasdlkfj || echo fail; echo hi'
        ksh[1]: .: asdlfjasdlkfj: cannot open [No such file or directory]

as does bash in posix mode:
        $ bash --posix -c '. asdlfjasdlkfj || echo fail; echo hi'
        bash: line 0: .: asdlfjasdlkfj: file not found

only bash in normal bash mode does not:
        $ bash -c '. asdlfjasdlkfj || echo fail; echo hi'
        bash: asdlfjasdlkfj: No such file or directory
        fail
        hi
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to