ну и то и другое - встроенные команды bash
$ docker run -it --rm ubuntu:22.04
# du -h /usr/bin/[
52K /usr/bin/[
# file /usr/bin/[
/usr/bin/[: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b4bf1a57290d4330465d03f260df793e7bcf55e0, for GNU/Linux 3.2.0, stripped
# dpkg -S /usr/bin/[
coreutils: /usr/bin/[
$ docker run -it --rm ubuntu:22.04
# echo -e '[ -s /bin/bash ]\necho $?' > /tmp/test.sh
# bash /tmp/test.sh
0
# sh /tmp/test.sh
0
# dash /tmp/test.sh
0
# zsh /tmp/test.sh
0
# echo -e '[[ -s /bin/bash ]]\necho $?' > /tmp/test.sh
# dash /tmp/test.sh
/tmp/test.sh: 1: [[: not found
127
Как говорится - но есть нюансы )))