[TUHS] sh: cmd | >file

Dave Horsfall dave at horsfall.org
Sat Jan 4 09:32:15 AEST 2020


On Fri, 3 Jan 2020, markus schnalke wrote:

> Especially I'd like to know since when and why ``>file'' is a full 
> command? Was it clever design or by accident?

I/O redirection occurs before command execution (in this case, the null
command).

First, it creates (or truncates) the file, then runs the command; oh, it's 
the null command...

-- Dave


More information about the TUHS mailing list