looks like [[ are not POSIX compliant - only reserved in POSIX - so using [[ does not work with dash which is strict POSIX, trying an alternative from stackoverflow