1 byte more?

Xu Qiang Qiang.Xu at fujixerox.com
Wed Jul 20 05:18:50 GMT 2005


Dan Nelson wrote:
> vi probably put a newline character after the one you typed.  You can
> use
> 
>   echo -n 0 > count.txt
> 
> or a text editor that doesn't force a newline as the last character in
> a file (joe for example).

Yes, You hit the point again. 

I used xemacs to hex edit that file, to find a newline character (0x0a) is added to the txt file, even though I didn't touch the "Enter" key in my keyboard. Maybe vi is too aggressively helpful. :)

Your "echo -n" is a solution. And xemacs is also a better choice without this annoying problem. 

Thank you, 

Regards,
Xu Qiang




More information about the freebsd-questions mailing list