I have a large text file, I just need to import certain lines out from it.
Sample data:
account abc <- import this whole line
lot's of text here <- ignore
total 1: xxx <- import this whole line
total 2: xxx <- import this whole line
account def <- import this whole line
lot's of text here <- ignore
account def <- ignore
lot's of text here <- ignore
total 1: xxx <- import this whole line
total 2: xxx <- import this whole line
I just want to import the line start with 'account', 'total 1' and 'total 2'. From my sample data, import the whole line when found the word 'account', then look for the word 'total 1' and import the whole line, and find the word 'total 2' and import the whole line. After that, look for the word 'account' again and do the same thing again.
Thanks.
Sample data:
account abc <- import this whole line
lot's of text here <- ignore
total 1: xxx <- import this whole line
total 2: xxx <- import this whole line
account def <- import this whole line
lot's of text here <- ignore
account def <- ignore
lot's of text here <- ignore
total 1: xxx <- import this whole line
total 2: xxx <- import this whole line
I just want to import the line start with 'account', 'total 1' and 'total 2'. From my sample data, import the whole line when found the word 'account', then look for the word 'total 1' and import the whole line, and find the word 'total 2' and import the whole line. After that, look for the word 'account' again and do the same thing again.
Thanks.