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: 2275
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 last 100 lines from multiple files? (80%)
How to remove/delete extra blank lines in multiple text files? (75%)
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 insert a keyword only at first line of multiple text files? (69%)

Check Demo of Text file parser
Keywords:
non  blank line  output to single file  blank  cross line  the last  last  single  single file  las  extract last line  extract last  add text to last line  add text last line  add the last line  extract line from text file windows  extract from line to line text file windows  windows extract text from multiple files