file1 and file2 are
identical, which isn't what you wanted. But
it's what you got.
Some versions of cat give you a warning message in
this situation (cat: file1: input file is
output file). This might lead you to believe that somehow
cat was smart and managed to protect you. Sadly,
that's not true. By the time cat
figures out that an input file and an output file are the same,
it's too late: file1 is already
gone. This bit of catty cleverness does have a
function, though: it prevents commands like the following from
creating infinitely long files:
% cat file1 file2 >> file2
-- ML
 |  |  |
27.3. What's a Shell, Anyway? |  | 27.5. Output Command-Line Arguments One by One |