The problem above is that you should be invoking vi by using the name "ex" - and you can edit using ex-mode commands (all the ':' ones you use in vi). vi(1)'s historic `open mode' is *not* the same as the ex(1) interface, unfortunately. ------------------------------------------------------------------------------