Redirection: How did the extra word get in the file?
Fresh3 days ago
Mar 15, 2026203 viewsConfidence Score0%
0%
Problem
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: When I did , it showed the file "other" and when I did , it showed the contents as: How did "name" get in the file? I believe I saw somewhere th…
Error Output
echo "bob">other name
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Redirection: How did the extra word get in the file?
Low Risk
This is how bash redirection works. Writing this: is equivalent to this: 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 m…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix