Hacker News new | ask | show | jobs
by frou_dh 4369 days ago
...and perhaps surprisingly also a program sitting on disk.

    $ type [
    [ is a shell builtin
    $ [ 1 -gt 0
    bash: [: missing `]'

    $ whereis [
    /bin/[
    $ /bin/[ 1 -gt 0
    # success
2 comments

You got a root shell out of `/bin/[` ? Impressive :)
Hm, which version of [ is that? I get:

    $ /usr/bin/[ 1 -gt 0 && echo success
    /usr/bin/[: missing `]'
    $ /usr/bin/[ 1 -gt 0 ] && echo success
    success
(This is from coreutils 8.13-3.5 on Debian GNU/Linux)
What ships in OS X 10.9, presumably BSD-derived.