I expected the last command to return "test", but it does not.
foo@bar:~/docs$ echo "test" > test foo@bar:~/docs$ cat test test foo@bar:~/docs$ cat test > test foo@bar:~/docs$ cat test foo@bar:~/docs$