I've the following file (which is a simplification of the
184.108.40.206 127.0.0.1 220.127.116.11
and I'm trying to invoke the following command:
ex +g/127/d -cwq file
which is supposed to remove lines consisting
127, then write and quit.
It works when using
vim -e, however it doesn't work using
Although when printing buffer after the change, it seems the change has been made:
ex +"g/127/d|%p" file
but it also displays the following warning:
Badly formed address
I'm using original Ex v4.0 (gritter) 3/25/05. On OS X can be installed via
brew install ex-vi.
Why doesn't the above command work in
ex editor? And how do I make it work?