awk

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractProgram

func ExtractProgram(raw string) string

ExtractProgram strips markdown fences and surrounding whitespace from model output.

func Run

func Run(awkBin string, fieldSep string, programPath string, stdin io.Reader, stdout io.Writer) error

Run executes awk with optional -F and a program file, streaming stdin to stdout.

func RunCSV added in v0.2.0

func RunCSV(awkBin string, csvDelimiter string, programPath string, stdin io.Reader, stdout io.Writer) error

RunCSV parses stdin as CSV and executes awk over normalized rows. It preserves quoted fields (including commas) by parsing first, then joining fields using an internal separator that awk receives via -F.

func Validate

func Validate(awkBin, programPath string) error

Validate runs awk -f against an empty stdin to catch syntax errors.

func WriteTemp

func WriteTemp(dir, program string) (string, error)

WriteTemp writes program to a temp file and returns its path.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL