`, `| `, and ` | ` tags, and specifies that only selected fields should be included in the table.
```FFE Configuration
output html {
file_header "\n\n\n\n\n\n"
header "| %n | \n"
record_header " \n"
data "| %t | \n"
file_trailer " \n\n\n"
no-data-print no
}
```
--------------------------------
### View FFE Anonymized Data with Nice Format
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
Displays anonymized personnel data using the 'nice' output format which shows record type, structure name, filename, and field order. Demonstrates how anonymized hash values and random numbers replace original PII.
```bash
ffe -pnice personnel_anon.fix
```
--------------------------------
### View personnel data file content
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
This snippet displays the raw content of the 'personnel' flat file, which contains fixed-length fields for first name, last name, and age. It serves as the input data for the `ffe` tool, demonstrating its simple, unformatted structure.
```bash
cat personnel
```
```text
john Ripper 23
Scott Tiger 45
Mary Moore 41
```
--------------------------------
### Filter Data and Generate HTML Table with FFE Expression
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
This shell command demonstrates using FFE to filter data based on an expression (`-e FirstName^Scott`) before generating an HTML table. It outputs only records where the `FirstName` field matches 'Scott', showcasing FFE's data filtering capabilities.
```Bash
ffe -p html -f FirstName,LastName,Age -e FirstName^Scott personnel.fix
```
--------------------------------
### Generate HTML Table from Fixed-Length File with FFE
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
This shell command uses FFE to process `personnel.fix` and output the data as an HTML table. It applies the 'html' output definition and explicitly selects `FirstName`, `LastName`, and `Age` fields to be included in the table.
```Bash
ffe -p html -f FirstName,LastName,Age personnel.fix
```
--------------------------------
### Load Lookup Table from External File
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
Defines a lookup table that reads mapping data from an external file instead of inline pair definitions. The file format uses semicolon-delimited key-value pairs, one per line.
```FFE Configuration
lookup Type
{
search exact
file lookupdata
default-value "Unknown record type!"
}
```
--------------------------------
### Define Binary File Structure in FFE
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
Defines a binary structure 'bin_data' with various data types including fixed-length text, signed/unsigned integers with endianness, floating-point numbers, BCD, and hexadecimal fields. Supports platform-specific byte ordering (little-endian _le, big-endian _be).
```FFE
structure bin_data
{
type binary
record b
{
field text 5
field byte_int int8
field integer int32_le
field number double_le
field bcd_number bcd_be_3
field hex hex_be_4
}
}
```
--------------------------------
### FFE Binary Data Type Reference
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
Comprehensive list of supported binary field types in FFE, including system-dependent types (char, short, int, long, llong with unsigned variants), fixed-width integers with endianness specification (int8, int16_be, int32_le, etc.), floating-point types (float, double with endianness options), and specialized formats (bcd_be_len, bcd_le_len, hex_be_len, hex_le_len for BCD and hexadecimal data).
```FFE Configuration
char | short | int | long | llong | ushort | uint | ulong | ullong |
int8 | int16_be | int32_be | int64_be | int16_le | int32_le | int64_le |
uint8 | uint16_be | uint32_be | uint64_be | uint16_le | uint32_le | uint64_le |
float | float_be | float_le | double | double_be | double_le |
bcd_be_len | bcd_le_len | hex_be_len | hex_le_len
```
--------------------------------
### Generate Nested XML from Hierarchical CSV Data - FFE Configuration
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
Processes comma-separated parent-child records using FFE's level-based nesting to generate structured XML output. The configuration defines two record types (parent and child) with level specifications (1 and 2) to establish hierarchy, enabling automatic grouping of child records under their parent elements with proper XML formatting.
```FFE
structure family
{
type separated ,
record parent
{
id 1 P
field FILLER
field Name
field Child_count
level 1 parent
}
record child
{
id 1 C
field FILLER
field Name
field Age
field FavoriteColor
level 2 child children
}
}
output nested_xml
{
file_header "\n"
data "<%n>%t%n>\n"
indent " "
record_trailer ""
group_header "<%g>\n"
group_trailer "%g>\n"
element_header "<%m>\n"
element_trailer "%m>\n"
}
```
--------------------------------
### Configure FFE for Human-Readable Output
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
This FFE output definition formats parsed data for human-readable display. It uses custom record headers showing source information and indents field-value pairs for clear presentation, suitable for screen output or reports.
```FFE Configuration
output nice {
record_header "%s - %r - %f - %o\n"
data "%n=%t\n"
justify =
indent " "
}
```
--------------------------------
### Define Lookup Table for Field Value Translation
Source: https://github.com/timosavi/ffe/blob/master/doc/ffe.html
Creates a lookup table that maps single-character codes to human-readable descriptions. Supports exact search matching and provides a default value for unmapped entries. Useful for translating codes in output.
```FFE Configuration
lookup Type
{
search exact
pair H Header
pair B "He is a Boss!"
pair E "Not a Boss!"
pair T Trailer
default-value "Unknown record type!"
}
``` |