in reply to Re^3: read file line by line then do something and write to same file
in thread read file line by line then do something and write to same file

Yes, I believe you're correct regarding the strace. I recall now that the documentation is not 100% truthful as to what is happening behind the scenes. If you use -i.bak instead of -i, you'll probably see an open/rename/open/read+write/close/close instead of open/unlink...


Dave