cutter

Cut files according to a position list

Version on this page:0.0
LTS Haskell 22.13:0.0@rev:2
Stackage Nightly 2024-03-14:0.0@rev:2
Latest on Hackage:0.0@rev:2

See all snapshots cutter appears in

BSD-3-Clause licensed by Henning Thielemann
Maintained by [email protected]
This version can be pinned in stack with:cutter-0.0@sha256:d6bd7b107f0a10b51939483ae4e4fcc29c95b2bae123175bcd134fe8e14125c9,1642

Module documentation for 0.0

There are no documented modules for this package.

Cut a file into chunks according to a position list and concatenate the chunks. The chunks must not overlap and must be in increasing order.

Use it this way:

cutter positions.csv <datain >dataout

The file positions.csv must be a comma separated spreadsheet file (CSV), where the first column contains the chunk beginnings and the second column contains the pause beginnings. A pause begins one byte after a chunk ends. The other columns are ignored and may contain annotations of the chunks.

The positions file may also contain line numbers. In this case you run the command this way:

cutter -l positions.csv <datain >dataout

Example: remove selected attachments from e-mails in mbox file using the lsmbox command from http://hackage.haskell.org/package/mbox-utility.