In your program main loop, you still iterate over each file and call sorting. If you want to sort the content of all files, either concatenate all files before starting your program or change your program to first read the content of all files and then sort it, instead of reading and writing a single file. This will mean moving some of the code out of sorting, especially the part where it reads in the whole file, and the part where it writes the sorted file.
In reply to Re: Use Schwartzian transform across multiple files
by Corion
in thread Use Schwartzian transform across multiple files
by Sonya777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |