[TriLUG] Help with search and replace in vi using regexp

Joseph Mack NA3T jmack at wm7d.net
Mon Jul 14 16:41:24 EDT 2008


On Mon, 14 Jul 2008, Brian Blater wrote:

> I want to search for each line that begins with #EXT and is followed
> by any number of visible characters or spaces and delete that line.


dennis:~# cat foo.txt
abc
#EXT fooo fooo foo
not_#EXT

the previous line was blank
#--------------------


dennis:~# grep -v ^#EXT foo.txt
abc
not_#EXT

the previous line was blank
#--------------------


Joe


-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list