Greetings, Yaakov Selkowitz! > On 2016-04-03 01:24, Achim Gratz wrote: >> Yaakov Selkowitz writes: >>> I am not in favour of /bin/sh being alternatives-able. >> >> I'd posit that it should not be bash then and somwone else might >> reasonably want a different /bin/sh, perhaps even bash. Which is >> exactly why the alternatives system exists.
> Unfortunately the reality is that not all #!/bin/sh scripts are 100% > POSIX compliant, nor am I convinced that all the possible shells are > interchangeable either. Ultimately this would lead to unpredictable > (and difficult to support) behaviour for scripts. >>> The *proper* course of action is to use the shebang for the script >>> interpreter you require, i.e. /bin/dash. >> >> It's perfectly OK to use /bin/sh (I'd even recommend it) if all you want >> is a POSIX shell. > True, but the OP said "my scripts rely on ASH/DASH functionality that is > not present in BASH". If you use functionality specific to a given > shell, then you have to shebang that shell! I agree, of course, but in this case, I have to ask one not strictly Cygwin-related question: Is 'local -' a POSIX construct and/or is there a way to achieve the same effect without using it? (Localize any shell option changes within a function.) Because, within my reach, Cygwin is the only system that not using DASH as /bin/sh. Though, I may try rolling some busybox… -- With best regards, Andrey Repin Monday, April 4, 2016 01:56:44 Sorry for my terrible english...