I would expect -l0 to replace the first line only if it's a number (which represents the amount of lines), seeing how $read(file,0) works exactly in the same way.