The python implementation of an external sort for sorting large text files. This script consumes only 8Mb RAM to sort 26G file.
FILENAME=/media/data/test2.csv python3 generator.py
INFILE=/media/data/test2.csv OUTFILE=/media/data/test2_sorted.csv python3 external_sort.py
python3 external_sort.py
./create_cgroup.sh
sudo cgexec -g memory:myGroup2 INFILE=/media/data/test2.csv OUTFILE=/media/data/test2_sorted.csv python3 external_sort.py
python3 -m unittest