buffer_size = min(1/8 * physical_RAM, free_memory) #### sort -S 3.5G ... #### my %expand = ( "\x10" => "\x11\x11", "\x11" => "\x11\x12"); s/([\x10\x11])/$expand{$1}/g;