4 ms·
> ShellCheck recognizes three hashbangs, POSIX, BASH, and the Korn shell (as is explained in the manual page). I would argue and assert that BASH is the least r
by yjftsjthsd-h 6y ago
> ShellCheck recognizes three hashbangs, POSIX, BASH, and the Korn shell (as is explained in the manual page). I would argue and assert that BASH is the least relevant of the three.
Depends on how you call "relevant", but I disagree regardless. If you're writing a shell script, you either need to be hard-core portable, in which case POSIX is your only option, or you don't, in which case you're almost certainly targeting a GNU/Linux system with BASH installed. Of course, if you know that you're targeting a specific system with a specific shell installed then by all means; if I were primarily an OpenBSD dev, I'd happily use ksh. But in general, the (unix) world is always going to give you POSIX, and BASH is the second most widely available option. And bluntly, for all that I love shell, if you're trying to argue for the most elegant or sophisticated language, sh/BASH/ksh is irrelevant because all of them kinda suck outside of their niche.
- chasil 6y agoOracle requires ksh93 when installing their database. For myself, I write to the ksh93 standard, but reduced to mksh, because I desire functionality, but portability. The question of s/BASH/bash is not relevant to me. The toolset is the question. Noted again is that Cygwin only implements mksh, not ksh93. Write for what you have. It would make me nothing but happy should "bash" adopt ksh syntax. Perhaps I should struggle to be sufficiently adept to submit patches.
- technion 6y agoOracle's list of "required packages" is annoyingly large but I cannot find a particular shell amongst them. The installation guide appears to have a paragraph devoted to each of bash, "bourne or korn", and C shells.
- chasil 6y agoYou also do not realize that my Oracle strobe script runs on Windows, with the cygwin mksh binary. I wrote it that way.