I need to select certain records from a file. The records are pipe-delimited, and therefore variable-length. The last two fields on the record are the onew I am concerned with. I want to pull records where the 2nd-to-last field = 'Y', and the last field = 'N'. For example, out of these four records:
123123|123123|123123|123213|Y|Y
23|123123|123123|123|Y|N
787878|8787|787878|87878|N|N
565656|5656|5656|565|N|Y
only this record would be pulled:
23|123123|123123|123|Y|N
I want to just re-direct my output to a file. Anyone know a quick and easy way to do this?
123123|123123|123123|123213|Y|Y
23|123123|123123|123|Y|N
787878|8787|787878|87878|N|N
565656|5656|5656|565|N|Y
only this record would be pulled:
23|123123|123123|123|Y|N
I want to just re-direct my output to a file. Anyone know a quick and easy way to do this?