> On Mon, Oct 10, 2011 at 11:06:16AM -0400, Len Giambrone wrote: > > I understand that. But if you change all your scripts to use > > > > #!/bin/bash > > instead of > > #!/bin/sh > > > > your scripts will fail when bash isn't installed. > > If you use bash features in your script, then you must ensure that the > script is executed by bash, and not by /bin/sh. There are many ways you > can accomplish this:
Len is using Mac OS X (darwin), which does have bash-3.2 installed as /bin/sh. He may have upgraded that to bash-4.1 or bash-4.2. I haven't looked at his report in detail yet, but I suspect the majority of the problems are the result of bash being Posix-conformant when called as /bin/sh. Depending on when that matters -- initialization, startup files, executing scripts -- he may be able to get around it by running `set +o posix'. As I said, I'll have to look at it more closely. 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/