I was looking at coreutils and found this as one of the files included as part of coreutils: /usr/bin/[
. What is [
and what does it do?
It is an executable. I just don't know what it does or how to use it.
$ file /usr/bin/[
/usr/bin/[: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
When I try to run it, I think it is defaulting to the bash built in line expansion. Instead of actually running the file.
$ "/usr/bin/["
/usr/bin/[: missing ‘]’
$ /usr/bin/\[
/usr/bin/[: missing ‘]’
man [
works on OS X.1
by using>1
instead of>&1
etc... maybe that's just me) I always thought[
was (just) a builtin language thing. Now I'm looking out for/bin/if
and/bin/then
and/bin/{
!