Page 1 of 1
type not breaks on 1a
Posted: 31 Jan 2014 16:16
by carlos
Hello. Until now I says that type command break on 1a character. But now, with more test I found that the type command end printing to screen on 1a character, but if redirect to the file, the file have all the data.
Example:
file.txt with:
text1[1A]text2
type file.txt
will print only text1
but type file.txt > mirror.log
mirror.log will have the same data that file.txt
I'm curious about why the data stop on the screen but not on the redirection file
Re: type not breaks on 1a
Posted: 01 Feb 2014 05:04
by Sponge Belly
Hi Carlos,
Reread the recent
Ctrl-Z Blues topic. You contributed towards the end, but I recommend reading the whole thing from the beginning. You’ll find out more about Ctrl-Z than you ever wanted to know!
- SB
Re: type not breaks on 1a
Posted: 01 Feb 2014 12:30
by penpen
The type command breaks the line containing only 0x1A character:
test.dat wrote:68 69 1A 74 68 65 72 65
Then just call:
Code: Select all
Z:\>cmd /U
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Z:\>type test.dat > test2.dat
test2.dat wrote:68 00 69 00
You can see that it is not caused by the output stream with this batch:
Code: Select all
@echo off
(
cmd /d /u /c type "test.dat"
echo abc
) > "test3.dat"
test3.dat wrote:68 00 69 00 61 62 63 0D 0A
penpen
Edit: added the "seem to" and the note.
Edit2: removed the "seem to" and replaced the note by the batch.
Note: I've remeoved my WRONG last post: lacking in concentration. Sorry to all.