$ 0 0 < file1 > file2 Seems to be shell-dependent, on zsh it works, on bash not. edit: deleted false statement