Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

903.Text file parser -- How to extract the last non-blank line from multiple text files?

User: editor -- 2012-01-16          << 902  904 >>
Hits: 73
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract the last non-blank line from multiple text files?
Input Sample:
=====================
file1:

line11
...
line1n

=====================
file2:

line21
...
line2m

=====================
...
Output Sample:
line1n
line2m
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" menu
2. drag multiple text files from windows file browser to "Batch Runner" window
3. click "Fast Replace" button open "Fast Replace" window
4. click "Add" to add new rule
* set "search" to:

* set "replace" to:

* click "ok"
5. check option of "reg exp", "cross line" and "extract", and click "start"
6. click "output to single file" and select an output file, done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to extract and remove common lines from multiple files? (73%)
How to replace a word only one time in multiple text files? (72%)
How to extract all image links from multiple html files?  (70%)
How to move the last line to the beginning for multiple text files? (70%)
How to remove the last 3 lines of multiple text files all at once? (70%)
How to extract specified lines in multiple excel(csv) files? (69%)
How to delete the second column in multiple text files? (68%)
How to extract unique ip addresses from multiple text/html files? (67%)

Check Demo of Text file parser
Keywords:
blank line  blank  cross line  last  single  las  file parser  parse  text file parser  pars  extract last line  last line  search and replace text files parser  extract text from multiple files  line last  extract from multiple text files  extract multiple  add line to multiple text files windows