Question

Locked

UNIX AWK or simple ksh script to process a file

By zack.hu ·
(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 conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums