Home » Questions » Computers [ Ask a new question ]

Redirection: How did the extra word get in the file?

Redirection: How did the extra word get in the file?

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:

Asked by: Guest | Views: 294
Total answers/comments: 2
Guest [Entry]

"This is how bash redirection works.

Writing this:

echo ""bob"">other name

is equivalent to this:

echo ""bob"" name >other

redirection can appear anywhere on the line, the chevron (>) only applies to ""other"".

This allows people flexibility of how they wish to structure their commands. If it looks more clear doing something like this:

>file.txt echo ""one"" ""two"" ""three""

then that is up to the person writing the script or command."
Ahxona [Entry]

lipitor 80mg sale <a href="https://lipiws.top/">buy lipitor 80mg sale</a> order lipitor 80mg online