In UNIX what "cat file1 > file1 does?"

Viewed 6154

When the output of a command is redirected to a file, the output file is created or truncated by the shell before the command is executed, any idea what cat foo > foo does?

4 Answers
Related