Page 2 of 2

Re: Some content of text file lost when printing to screen

Posted: 22 Apr 2019 05:57
by aGerman
The internal buffer used for SET /P is 1024 characters wide. One element is for the terminating null in C. Since a line on Windows ends with Carriage Return and Line Feed characters, lines that exceed a length of 1021 characters will result in an unreliable and probably faulty content of the line read. That was the reason for my question.
Elsewise, SET /P is commonly used to read the first line of a file. Called in a loop and applied to the same input stream, it is able to read linewise.

Steffen.

Re: Some content of text file lost when printing to screen

Posted: 22 Apr 2019 08:43
by Squashman
sincos2007 wrote:
22 Apr 2019 05:24
I have seen following syntax in bash shell
doubtful.

Re: Some content of text file lost when printing to screen

Posted: 22 Apr 2019 12:51
by ShadowThief
Squashman wrote:
22 Apr 2019 08:43
sincos2007 wrote:
22 Apr 2019 05:24
I have seen following syntax in bash shell
doubtful.
Maybe they mean the

Code: Select all

<in_file >outfile
bit? I know I don't use that too often outside of Linux.