UNIX AWK or simple ksh script to process a file - TechRepublic
Question
September 8, 2010 at 08:11 AM
zack.hu

UNIX AWK or simple ksh script to process a file

by zack.hu . Updated 15 years, 10 months ago

(1) read an input file input.
(2) if { see a special pattern name out of a list (another file flist), delete this and the following lines until see a line with a single special character ‘/’, remove this line ‘/’ as well.}
else { just copy the content of input} Continue until flist is exhausted.

example:


I am a special name 1
random staff to be removed

more random staff to be removed
/
I am not special and should be kept
keep this line

keep this line
/

This discussion is locked

All Comments