standout - Linux
Overview
standout is a text processing tool that extracts highlighted or emphasized text from a document or stream. It can quickly identify and retrieve important information from various document formats.
Syntax
standout [options] [files...]
Options/Flags
- -h, –help: Display usage help.
- -v, –version: Display version information.
- -f, –format: Specify output format (txt, html, or json). Default: txt
- –html-path: Set the output path for HTML format.
- –json-path: Set the output path for JSON format.
- -c, –case-sensitive: Perform case-sensitive matching.
- -e, –empty: Ignore empty matches.
- -n, –number: Number extracted matches.
- -p, –pattern: Set a custom extraction pattern (regex).
Examples
Extract highlighted text from a file:
standout sample.txt
Extract emphasized text in HTML and save to a file:
standout -f html -html-path output.html sample.html
Extract numbered matches with a custom pattern:
standout -n -p "(\d+)(\w+)" sample.txt
Common Issues
No output:
- Ensure that the file being processed contains highlighted or emphasized text.
- Verify that the custom pattern is valid if used.
Integration
Pipeline with other tools:
cat sample.txt | standout | wc -l
Extract matches and further process data:
standout sample.txt | sort | uniq