Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
RSS: Replace Pioneer Examples
406.Random word generator -- How to sort all the lines of a text file randomly?
User:
editor -- 2010-01-29
<< 405
407 >>
Hits:
4962
Type:
Random word generator
Search all
Random word generator
examples
Description:
How to sort all the lines of a text file randomly?
or shuffle all the lines
Input Sample:
aa
bb
cc
dd
eee
sdf
Output Sample:
aa
sdf
dd
bb
cc
eee
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open replace dialog:
* in 'Replace with Pattern' enter:
rand_str_unique(-1*(count($match,"\n")+1),split("\n",$match))
3. click 'Replace', done!
For the function of rand_str_unique and count, please refer to:
http://www.mind-pioneer.com/replace/help/Functions.html
Download Script:
scripts/406.rst.zip
Screenshot 1: Replace_Window
Similar Examples:
How to extract half of lines from a text file randomly?
(88%)
How to extract 3 lines from each file randomly?
(75%)
How to shuffle all the lines in a text file?
(75%)
How to sort all lines of text by specified keyword?
(74%)
How to reverse the order of all the lines in a text file?
(73%)
How to sort all lines of ip addresses in a text file?
(71%)
How to take part of the first line and insert them in text file randomly?
(70%)
How to sort all the lines of a text file by order the multiple columns?
(70%)
Check Demo of
Random word generator
Keywords:
shuffle
functions
unique
randomly
random word generator
refer
help
random word gen
word generator
ord generator
word sort generator
randomly sort text word
sort text generator
shuffle lines in the text
sort randomly
text generator count
shuffle text lines
shuffle all lines