/usr/bin/[ from coreutils


I have just found out that I have an executable file called [ (open-square-bracket), which appears to come from coreutils 8.32-1:

$ pacman -Qo /usr/bin/\[
/usr/bin/[ is owned by coreutils 8.32-1

Is that intentional?

Yes and it is the same as test

check out

man test

And both [ and test are also internal commands in bash, but the POSIX specification demands that they be also available as separate executables, in case one were to use a shell where they are not internal. :wink:

Thanks @xabbu and @Aragorn! :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.