Re:ShellCheck: Finds bugs in your shell scripts
by koala_man on Monday May 03, 2021 @10:34PM
(#27033484)
That is bashate, not ShellCheck, but there is good reason to use [[ since these operators are not POSIX to begin with and don't work in [.
Re:ShellCheck: Finds bugs in your shell scripts
by hashhar on Tuesday May 04, 2021 @03:11AM
(#27034785)
Because the =~ and > and < operators aren't defined for [ in POSIX.
Also ShellCheck suggests similar improvement only when your shebang says that bash is the expected interpreter instead of sh (or other ways of denoting POSIX compat).
Re:ShellCheck: Finds bugs in your shell scripts
by yamellasmallela on Monday May 03, 2021 @11:32PM
(#27033804)
because its 2021 and we should get over compatibility with archaic tech?
Is there any reason to prefer bashisms over POSIX?