LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ffe

flat file extractor

TLDR

Extract fields from a flat file using a configuration
$ ffe -c [config.ffe] [data.txt]
copy
Output as a named print format
$ ffe -c [config.ffe] -p [csv] [data.txt]
copy
Filter records matching an expression
$ ffe -c [config.ffe] -e [field=value] [data.txt]
copy
Show structure information from the configuration and exit
$ ffe -c [config.ffe] -I
copy

SYNOPSIS

ffe [options] [files]

DESCRIPTION

ffe (Flat File Extractor) parses fixed-width and delimited flat files according to a structure definition provided in a configuration file. It extracts fields and can convert data to formats such as CSV or XML.Configuration files define record layouts with field names, widths, and types. The tool handles multiple record types in a single file, common in mainframe and batch-processing data formats.

PARAMETERS

-c, --configuration file

Configuration file defining record structures and print formats.
-p, --print format
Select a named print format defined in the configuration file.
-o, --output file
Write output to the specified file instead of stdout.
-f, --field-list fields
Print only the listed fields (comma-separated).
-e, --expression expr
Print only records where the expression matches.
-a, --and
Combine multiple expressions with logical AND (default is OR).
-X, --casecmp
Use case-insensitive expression evaluation.
-v, --invert-match
Print only records that do not match the expression.
-r, --replace field=value
Replace field contents with the given value in output.
-l, --loose
Do not abort on invalid input lines.
-d, --debug
Write invalid input lines to `ffeerror<pid>.log`.
-I, --info
Show structure information from the configuration file and exit.

INSTALL

sudo apt install ffe
copy
brew install ffe
copy

CAVEATS

Requires a configuration file. Complex record structures need careful definition. The `-p` flag selects a named print format from the config, not a generic format name.

SEE ALSO

awk(1), cut(1), csvtool(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid