diff options
| author | Thorsten Töpper <atsutane@freethoughts.de> | 2025-08-10 18:16:07 +0200 |
|---|---|---|
| committer | Thorsten Töpper <atsutane@freethoughts.de> | 2025-08-10 18:16:07 +0200 |
| commit | 9e2f3d59cf249403859916df9756c179753ea7e0 (patch) | |
| tree | 6aaacfd22fc681fb7d95826ef65726c392cfc7d8 /LICENSE | |
| parent | 5b743929d23ca0e8004fe2d6bc8ff5c04ed9dbb9 (diff) | |
| download | small-utils-9e2f3d59cf249403859916df9756c179753ea7e0.tar.gz small-utils-9e2f3d59cf249403859916df9756c179753ea7e0.tar.bz2 | |
split_for_sort: Split a given file into buckets
The target bucket is decided based on the first X characters of a line.
The bucket name gets a prefix defined as argument and can be sorted
faster on weak hardware. Note: This is just a split alternative.
Real world usage in a shell script with a file in which the first 10
characters are the equal in each line, the following 2 bytes are
evaluated for splitting:
split_for_sort TMPSFS 12 raw_data.txt
for f in TMPSFS ; do
sort -o "${f}_sorted" -u "${f}"
done
\# Rely on the argument resolution to go with lexical order
cat TMPSFS*_sorted > sorted_data.txt
rm TMPSFS*
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions
