in reply to char count windows vs linux

I would like to get the same result for both platforms

The right answer to your question (if there is one) really depends on why you want to get the same result on both platforms?

If, for instance, you hope to use the information as the mechanism for some sort of comparison metric of two files on different systems, then counting chars is fundementally the wrong way to do it.

The only halfway legitimate reason I can think of for wanting to do this, is if your wanting to report the size before and after transfer from one system type to the other, in which case chomping the lines and totaling the line length would probably work.

However, even for this purpose there are better methods of verifying transfers than just counting bytes as this won't detect corruptions of bytes on route.

A little more information may get you a better answer.


Examine what is said, not who speaks.