Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

What's happening here?

May
12,846
164
What's happening here?

Code:
v:\test8> echo foobar > filename[11111111].dat

v:\test8> dir /b
filename

v:\test8> type filename
foobar [11111111].dat
 
On Tue, 27 Apr 2010 23:04:32 -0400, Charles Dye <> wrote:

|---Quote (Originally by vefatica)---
|What's happening here?
|
|
|Code:
|---------
|v:\test8> echo foobar > filename[11111111].dat
|
|v:\test8> dir /b
|filename
|
|v:\test8> type filename
|foobar [11111111].dat
|---------
|---End Quote---
|I think you need to quote that filename.

Yes. But why? Is TCC terminating the file name at "[" (not legal in a SFN)?

I never knew you could put redirection **anywhere** in the command line.

v:\> echo My dog>doggy.txt has fleas.

v:\> type doggy.txt
My dog has fleas.
--
- Vince
 
On 2010-04-28 05:17, vefatica wrote:

> I never knew you could put redirection **anywhere** in the command line.

Yes, that has been possible since whenever redirection was invented. :)
A redirection operator binds to the first argument to the right of it,
and anything following it, is just appended to any existing command line
arguments.

E.g.:

grep -i foo < bar > baz

can also be specified as:

grep -i < bar > baz foo

or:

grep > baz < bar -i foo

etc. Maybe this is why some people prefer to splice the redirection
operator and its argument together without a space, to clarify these two
belong together, e.g.:

grep -i foo <bar >baz
 

Similar threads

Back
Top