4 ms·
Or, at least when running Bash (possibly sh, didn't try), just >foo also works to create file "foo".
by Ives 15y ago
Or, at least when running Bash (possibly sh, didn't try), just
>foo
also works to create file "foo".
- koenigdavidmj 15y agoThat does not work, but :>foo (the happy file creation operator) does.
- avar 15y agoWhat do you mean it doesn't work? ">file" will work on all POSIX shells, it even works on Solaris /bin/sh! Also ":>" is not an operator, it's ":" (a built-in command that does nothing and returns true) and a redirection.
- waitwhat 15y agoLike the grand-parent, I have definitely used a Unix variant (CX/SX?) which required a command to do redirection.
- koenigdavidmj 15y agoIt was a joke to call it an operator.