Remix.run Logo
ndsipa_pomu 5 hours ago

Use ((...)) for arithmetic tests and [[...]] for other tests. [...] is for POSIX compatibility and not as useful as [[...]] though I don't remember the specifics.

jonhohle 5 hours ago | parent [-]

[[…]] is a bash (probably other shells, too) built in. […] could be a built in, or could be a symlink to /bin/test.

jcynix 4 hours ago | parent [-]

The [[…]] version was introduced in Peter Korn's korn shell, ksh88 IIRC.