Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.25 KB

README.md

File metadata and controls

32 lines (26 loc) · 1.25 KB

field-reveal

Linux command line tool that reveals the fields in Linux files or directories, along with a structured display.

before after
image {67F0E505-F90C-49E6-B810-4FC14F8A00BB}

why ?

Data fields in Linux are often non-present and requires internet search.
This is a simple solution to clearly display this basic information.

contributing

Adding entries to fields.txt will grow the use of the tool.
Each entry contains comma seperated values.

  1. Path to file.
  2. awk field separator. Defaults to , if empty.
  3. Optional, use PFAT to use regular expression for complex paterns in awk. Defaults to field separator (-FS), if empty.
  4. Number of fields.
  5. Comma seperated list of the fields present.

Example:

  1. /var/log/apache2/error.log,
  2. ([^[:space:]]+|"[^"]+"|\[[^]]+\]),
  3. FPAT,
  4. 5,
  5. Timestamp, Error code, Process/Thread IDs, Message code, Message

All together the entry should look like this:

/var/log/apache2/error.log,([^[:space:]]+|"[^"]+"|\\[[^]]+\\]),FPAT,5, Timestamp, Error code, Process/Thread IDs, Message code, Message