Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1269.Replace text in multiple files -- How to apply my own shuffle algrithm on multiple files?

User: editor -- 2014-12-08          << 1268  1270 >>
Hits: 2891
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
How to apply my own shuffle algrithm on multiple files?
Input Sample:
# My algrithm to shuffle an array 
 
sub shuffle { 
  my @array = @_; 
  return unless @array; 
  my $i = @array; 
  while( --$i ) { 
    my $j = int rand($i+1); 
    @array[$i,$j] = @array[$j,$i]; 
  } 
  return @array; 
}
Output Sample:
There are multiple files. 
shuffle all lines for each files.
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Settings->My Library" menu. 
2. copy and paste the function to the editor window, and click "ok". 
 
3. open "Tools->Batch Runner" menu. 
4. drag your files(one or multiple) to "Batch Runner" window. 
5. change "set output filename" entry to: 
so that the shuffle result will be saved to new file. 
6. click "Fast Replace" button 
7. click "add" to add new rules: 
* set "search" to be blank. 
* set "replace" to: 
8. make sure "reg exp" and "cross line" options are checked. 
9. click "start", done.

Screenshot 1:  Batch_Runner_Window


Screenshot 2:  Fast_Replace_Window


Similar Examples:
How to apply ROT18 encryption algrithm on multiple text files? (72%)
How to add empty line at begin of multiple files? (64%)
How to copy one file to create multiple duplicate files? (62%)
How to shuffle specified lines in multiple text files? (61%)
How to attach the md5 sum to the end of filename for multiple files? (61%)
How to read each line of a file and insert into multiple files? (60%)
How to add 0 before all 4 digit numbers in multiple filenames? (60%)
How to batch change format of multiple files? (60%)

Check Demo of Replace text in multiple files
Keywords:
my library  editor  rar  shuffle  ray  array  less  return  sub  rules  shuffle files  paste filename  shuffle text file  text shuffle  copy paste  shuffle line  split file rules  join filename