What's happening here?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#3
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
 

dim

Dimitry Andric
May 31, 2008
204
1
Netherlands
#4
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