|
|
|
|
|
by chasil
2578 days ago
|
|
The example AWK script will build an array of every unique line of text in the file. If the file is large, and mostly unique, then assume that a substantial portion of the file will be loaded into memory. If this is larger than the amount of ram, then portions of the active array will be paged to the swap space, then will thrash the drive as each new line is read forcing a complete rescan of the array. This is very handy for files that fit in available ram (and zram may help greatly), but it does not scale. |
|