filter lines based on PREFIX and PSKIP