master slider blank master slider blank

Sort huge files or sets of files

Sort huge text
files in seconds with TextPipe!1

Trusted by over 2600 IT professionals & companies worldwide2

NASA
Hewlett-Packard
Boeing
Pfizer
Accenture
US Department of Defence
Automated stream editor

What TextPipe can do for you

Convert, Transform, Cleanse & Extract data in text files

Unicode to/from 151 code pages & 145 encodings
Cleanse unstructured data
Extract data from XML, HTML, CSV, Tab and more

Convert Enormous Files Quickly and Easily

TextPipe handles files of unlimited size, from 2 Gigabytes to 2 Petabytes!
Other applications attempt to load the entire file into memory, grinding your system to a halt
Perform Data Warehouse ETL (Extract-Transfer-Load) Tasks

Specify all text processing filters in one place (stream editing)

Combined power of awk, sed, grep, perl
Save filters for later use, include pre-defined filters
Self-documenting - you WILL understand what you (or others) did last week!

How it works

Awesome key Features

Why TextPipe?

icon-image Exceptionally fast
icon-image Handles files of unlimited size
icon-image Multi-award winning
icon-image Perform multiple operations simultaneously
icon-image Prompt support
icon-image Cost-effective
icon-image One text tool to rule them all

How TextPipe sorts files that are too big for an editor

Most sort utilities read the whole file into memory first. That works for a 20 MB export, but a 6 GB web server log or a multi-million-row database dump will exhaust RAM, and the tool either stops or starts swapping to disk for hours. TextPipe uses an external merge sort. It reads the input in chunks, sorts each chunk, writes the sorted chunks to temporary files, and then merges them into the final output. Memory use stays small and predictable, and the only real limit is free disk space for the temporary files.

Sorting is rarely just alphabetical order. You may need to sort on a column inside each line, treat numbers as numbers instead of text, ignore upper and lower case, or sort in descending order. You can set these options in the Sort filter. Duplicate handling is part of the same step: TextPipe can discard repeated lines, keep only the lines that appear once, or write each distinct line together with the number of times it occurred.

Sample input and output

Suppose a web log has been reduced to the visitor IP address of each request, and you want a ranked list of the most active addresses. The input contains one address per line, in arrival order:

203.0.113.9
198.51.100.4
203.0.113.9
192.0.2.77
203.0.113.9
198.51.100.4

Sorting with the count-duplicates option, and then sorting the result by count in descending order, produces:

3 203.0.113.9
2 198.51.100.4
1 192.0.2.77

The same two steps run unchanged on a log with 200 million lines. A command line version of the filter set can be scheduled to run each night, so the report is ready every morning.

Typical settings

  • Sort key: sort the whole line, or only a column range or delimited field, for example the third comma-separated field of a CSV file.
  • Comparison type: choose text, numeric, or case-insensitive comparison. Numeric sorting puts 9 before 10, which text sorting does not.
  • Duplicates: keep all lines, remove duplicates, or count them.
  • Temporary folder: point it at a fast drive with free space of at least the size of the input file.

Practical applications

Database administrators sort and de-duplicate key lists before a bulk load, because loading sorted data into an indexed table is much faster. Security teams rank failed login attempts by source address. Mailing houses sort name and address files by postal code, and remove repeated records, to qualify for bulk postage discounts. Data analysts sort two extracts on the same key so that differences are easy to compare, or so that the files can be joined line by line.

Common pitfalls

  • Sorting numbers as text puts 100 before 20. Use numeric comparison when the key is a number.
  • Files with a header row sort the header into the middle of the data. Skip the first line with a line-range filter, or add the header back afterwards.
  • Duplicates that differ only by trailing spaces are not treated as identical. Trim the lines first if you want them merged.

Related pages

The sort large files feature guide lists every sort option. Once your data is in order you can join and merge files in a single pass, or convert mainframe EBCDIC files before sorting them. For wider data preparation projects, see the data conversion solutions page and the database consulting case study. Teams that tidy up Word documents as well can use WordPipe for the equivalent batch edits.

Select your Edition

TextPipe has editions for every need

Lite

Lone Wolf Developer
$69.95 / year 1 Year Free
Upgrades

Sort large files

Discard or count duplicates

Convert, extract, replace...

Automation - CLI/COM

Most Popular

Standard

Developers / DBAs / Business Analysts
$199 / year 1 Year Free
Upgrades

All features of Lite

Extract and cleanse data

Convert and transform text files

Automation - CLI/COM

Professional

Mainframe file gurus
$399 / year 1 Year Free
Upgrades

All features of Standard

COBOL (mainframe) copybooks

EBCDIC to/from ASCII

Automation - CLI/COM

TextPipe Case Studies

TextPipe is used across a broad range of industries

Banking and Finance
Banking & Finance
Cobol conversion / Documenting code
Systems Integrators
Database Consulting
Systems Integrators/High Tech
Print and Publishing
Print and Publishing &
Mail Houses

TextPipe Awards3

Winner of the SIA award as Best Application!
Excellent (5/5)
Excellent (5/5)
tucows5
Excellent (5/5)
5 Star Editor's Pick at ZDNet
seenonrocketdownload_black
EditorsPickAward
5star_filehungry
Excellent (5/5)
GET STARTED TODAY

FREE 30-DAY TRIAL

  1. Results are typical for a user with a modern workstation
  2. These are real user testimonials. Your results may vary
  3. Awards may no longer be present on the referred websites