3 ms·
I'm not the OP, but I'll give it a go. `[` is a Bash built-in command also known as `test`. The `-t` parameter tells it to test if a file descriptor is open fo
by godDLL 11y ago
I'm not the OP, but I'll give it a go.
`[` is a Bash built-in command also known as `test`. The `-t` parameter tells it to test if a file descriptor is open for `0`, which is also known as `STDIN`.
So if you're piping something into `STDIN` it will do `pbcopy`. If not -- it will do `pbpaste`.