I was testing a script and wanted to create a small file with a bit of text in it so I typed the following and forgot to escape the space in the filename:
echo "bob">other name
When I did ls, it showed the file "other" and when I did cat other, it showed the contents as:
bob name
How did "name" get in the file? I believe I saw somewhere that you can put redirection anywhere in a command. In fact, I just tested this:
echo >other Some text in a file
and "Some text in a file" was the contents of "other".
What is the purpose of this feature?
Of course, originally, I should have typed:
echo "bob">other\ name