It depends on the shell.
echo derp >file1 >file2 first opens
file1, truncates it, then arranges for the
echo derp to be written to
file1. Then bash does the same for
file2: it opens
file2, truncates it, and arranges for the
echo derp to be written instead to
The net effect is that
file1 is truncated (i.e. the content is deleted) and
stdout only goes into
file2. There is no chaining taking place. Bash is only capable of redirecting stdout to one place at a time. This is true for pipes as well:
echo derp > file | cat results in "derp" be written to the file, not to the pipe.
In zsh, however,
echo derp >file1 >file2 writes to both
file2, as you might intuitively expect. See MULTIOS in
man zshmisc for details if you use zsh.
To achieve this outside of
zsh, you can simply use
echo derp | tee file1 file2 > /dev/null is equivalent to zsh's
echo derp >file1 >file2.