is this not supose to add words to the line 1 instead erase the line and add a new text ??

Code:
write -i test.txt 1 
write -i test.txt and 2


the file appeas like this:
Code:
and 2


is there something rong with the code ?

thanks for all...