join

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunJoin

func RunJoin(w io.Writer, args []string, opts JoinOptions) error

RunJoin joins lines of two files on a common field

Types

type JoinOptions

type JoinOptions struct {
	Field1        int    // -1: join on this FIELD of file 1
	Field2        int    // -2: join on this FIELD of file 2
	Separator     string // -t: use CHAR as input and output field separator
	OutputFields  string // -o: output format specification
	IgnoreCase    bool   // -i: ignore case when comparing fields
	CheckOrder    bool   // --check-order: check input is sorted
	NoCheckOrder  bool   // --nocheck-order: do not check input is sorted
	Empty         string // -e: replace missing fields with EMPTY
	Unpaired1     bool   // -a 1: print unpairable lines from file 1
	Unpaired2     bool   // -a 2: print unpairable lines from file 2
	OnlyUnpaired1 bool   // -v 1: print only unpairable lines from file 1
	OnlyUnpaired2 bool   // -v 2: print only unpairable lines from file 2
}

JoinOptions configures the join command behavior

Jump to

Keyboard shortcuts

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