Right, -i is quite cool. But all -i does is open
the file for in-place editing; it doesn't "edit the file one line at
a time". If you notice, you also have the -p option in
the above command line; that's actually the switch that's
doing the line-by-line processing.