Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1365.Replace text in multiple files -- How to remove all lines but the second line from bottom?

User: YL -- 2016-04-25          << 1364  1366 >>
Hits: 861
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
How to remove all lines but the second line from bottom?
Input Sample:
file1
-----------
line1
line2
...
line(n-1)
line(n)
-----------

file2
-----------
line1
line2
...
line(n-1)
line(n)
-----------
Output Sample:
file1
-----------
line(n-1)
-----------

file2
-----------
line(n-1)
-----------
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 multple files to "Batch Runner" window
3. click 'Fast Replace' to open 'Fast Replace' window
4. click 'add' to add new rule
* set 'replace' to:

5. click 'start', done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to remove/delete all lines with even line number? (68%)
How to remove/delete all lines with even line number? (68%)
How to remove all the lines that with odd line number for multiple files? (65%)
How to remove all letters before "=" in each line of text file? (65%)
How to remove the trailing blank lines in the end of file? (64%)
How to remove all lines in file b.txt that appearred in a.txt? (63%)
How to remove all lines that contains more than one word? (63%)
How to remove all lines containing key-board letters only? (62%)

Check Demo of Replace text in multiple files
Keywords:
bottom  second line  remove all lines  second  remove all line  rule  remove all  fast replace  fas  fast  remove second line  remove all lines multiple  remove multiple lines in text  remove lines multiple files  remove new line  remove line from multiple files  remove multiple 4 line  remove text from multiple files