Question Locked

UNIX AWK or simple ksh script to process a file

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

(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
/
...

1 reply

This discussion is closed to new replies.