[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
RE: help in vi
Try this
:g/[pattern]/d
--
Mihir
> -----Original Message-----
> From: Saravanan Subbiah [mailto:saravanan.subbiah@xxxxxxxxx]
> Sent: Tuesday, January 16, 2001 17:07
> To: linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx
> Subject: [LIP] help in vi
>
>
> Hi,
>
> how do I delete a set of lines which matches some regular
> expression in
> vi ???
>
> :%d/reg.expression/
>
> doesn't seem to work !
>
> I know the following works, but it is cumbersome.
>
> :!grep -v "reg.expression" % > tmp.file
>
>
> -Saravanan