command

package module
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 3 Imported by: 0

README

Documentation

Overview

Package command implements the uniq filter: it collapses each run of adjacent identical lines into a single line, matching GNU uniq semantics.

Only ADJACENT duplicates are collapsed — non-adjacent repeats are preserved, exactly as the Unix tool behaves (uniq is typically preceded by sort).

Index

Constants

View Source
const (
	UniqDuplicatesOnly   uniqDuplicatesOnlyFlag = true
	UniqNoDuplicatesOnly uniqDuplicatesOnlyFlag = false
)
View Source
const (
	UniqUniqueOnly   uniqUniqueOnlyFlag = true
	UniqNoUniqueOnly uniqUniqueOnlyFlag = false
)
View Source
const (
	UniqCount   uniqCountFlag = true
	UniqNoCount uniqCountFlag = false
)
View Source
const (
	UniqIgnoreCase   uniqIgnoreCaseFlag = true
	UniqNoIgnoreCase uniqIgnoreCaseFlag = false
)

Variables

This section is empty.

Functions

func Uniq

func Uniq(opts ...any) gloo.Command[[]byte, []byte]

Uniq returns a Command that collapses runs of adjacent duplicate lines.

Flags:

  • UniqDuplicatesOnly (-d): emit only groups that repeat (count > 1)
  • UniqUniqueOnly (-u): emit only groups that do not repeat (count == 1)
  • UniqCount (-c): prefix each emitted line with its occurrence count
  • UniqIgnoreCase (-i): compare lines case-insensitively

-d and -u are complementary selectors; supplying both selects nothing, which is GNU uniq's behavior.

Types

This section is empty.

Directories

Path Synopsis
Package alias provides unprefixed names for the uniq command and its flags.
Package alias provides unprefixed names for the uniq command and its flags.

Jump to

Keyboard shortcuts

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