3 ms·
>yours will explode if the input is too big, so, it's not equivalent to Shell, which will buffer the input. I agree that mine would explode on a massive file,
by falcor84 4y ago
>yours will explode if the input is too big, so, it's not equivalent to Shell, which will buffer the input.
I agree that mine would explode on a massive file, but how would the shell version avoid this, given the need to sort? As far as I know, it sorts entirely in memory.
- Karellen 4y agoWhen the input is large enough, GNU `sort` writes the input in chunks to multiple temporary files, sorts the individual files, and then merges the result for output. https://unix.stackexchange.com/questions/279096/scalability-of-sort-u-for-gigantic-files https://unix.stackexchange.com/questions/279096/scalability-...