windows - Strange stdout redirect behavior -


I've seen some strange behavior in redirecting stdout into files with special characters in 'name'.

The people I have found:

echo.> Gt; F, test returns a file named f , in which text , test . . , ; and is the same (obviously any character has a comma changes).

Echo & Gt; F: The test creates a byte file, named zero F ~ 000% HK . The first letter of the output file name matches the redirect character and the 'file name' between the . Capitol (I believe . is ignored / The reason for trying to make a file named f .... is removed .... creates a file called f only). I do not know what the rest means, changing the text after 'filename' will not change anything. echo & Gt; F: Nope still produces an empty file F ~ 000% HK .

Another example of the same thing; resonate. & Gt; Exam .: Examines a file of zero bytes named test {/ code> test ~ 4n5 .

The subsequent example in the batch produces the same results as empty files with strange names, but instead of the former example a file named f is generated, in which the empty line it occurs.

Any explanation / "discrepancies" to add?

,; = & Lt; Space & gt; & Lt; Tab & gt; are standard delimiters, so echo & Gt; F, test is same echo, test & gt; You can see that in this case from the batch batch file, which starts echo (only before redirection on ). Redirection syntax can be tricky because it only takes the first argument for the file and with more than the command, you can convert the result with echo & gt; echo.> Test .: Test - "F, test"

- You are redirecting (you are with FAT32 or NTFS Does not support ADS and its results may be different)? With dir / r (r switch is available from Vista and above) or you can see the status of ADS. You can use more commands to see ADS content:

more & lt; Examinations are: Here are the commands that I can find that ADS: FOR / F, FIND, FINDSTR, more, certify, clip, expansion, sorting < / P>

>


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -