Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

418.Advanced search and replace -- How to reverse the order of all the lines in a text file?

User: editor -- 2010-02-10          << 417  419 >>
Hits: 2481
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to reverse the order of all the lines in a text file?
Input Sample:
line1 
line2 
line3 
... 
linen
Output Sample:
linen 
... 
line3 
line2 
line1
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file 
2. ctrl-h open 'replace' dialog 
enter following in 'Replace with pattern': 
 
3. click 'replace',done! 
4. ctrl-s save to file. 
 
Note: lines_r($string,start,end) means join the specified line from start to end line number with reversed order. 
 
Please check online help with F1.

Screenshot 1:  Replace_Window


Similar Examples:
How to reverse the order of the first column in text file? (76%)
How to reverse all cases of letters in a text file? (76%)
How to remove/delete all blank lines in a text file? (75%)
How to reverse the order of characters in each line of text? (74%)
How to sort all the lines of a text file randomly? (73%)
How to shuffle all the lines in a text file? (73%)
How to delete the first word in each line in a text file? (73%)
How can I reverse the sequence of all words in a text file? (72%)

Check Demo of Advanced search and replace
Keywords:
reverse the order  online  reverse  help  strings  order  specified line  string  end line  join  text replace reversed  reverse lines  replace text online  search and replace text online  text file replace online  file replace online  reverse line  search text file in reverse