awk

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAwk

func RunAwk(w io.Writer, r io.Reader, args []string, opts AwkOptions) error

RunAwk executes a basic AWK-like pattern scanning This is a simplified subset supporting: - Field access ($1, $2, etc.) - Print statements - Pattern matching (BEGIN, END, /regex/) - Basic string operations r is the default input reader (used when args is empty or contains "-")

Types

type AwkOptions

type AwkOptions struct {
	FieldSeparator string            // -F: input field separator
	Variables      map[string]string // -v: var=value
	Program        string            // program text
}

AwkOptions configures the awk command behavior

Jump to

Keyboard shortcuts

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