Welcome to the Earthdata Forum! Here, the scientific user community and subject matter experts from NASA Distributed Active Archive Centers (DAACs), and other contributors, discuss research needs, data, and data applications.
by jasonlefler » Fri Jun 22, 2018 3:58 pm America/New_York
Just for some extra closure, this problem is caused by inconsistent default shells between OSes. Of the /bin/sh links/binaries, these are the most common (as far as I can tell):
- symlink to bash shell - symlink to bash shell in compatibility (POSIX?) mode - dash shell binary - there's a few others like ash, etc, that I've never personally seen in the wild but I know they're out there
Officially, using == is invalid, but Bash will (sometimes, usually, always?) allow it. Dash won't (usually or ever?), which Ubuntu uses in 18.04. There's a movement for OSes to switch away from Bash for their default /bin/sh to speed up boot times, etc. I'm guessing that's why the invalid syntax went unnoticed for so long; OSX, which most of those blocks are for, probably set /bin/sh to Bash.