shellcut

command module
v0.0.0-...-9803588 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 8 Imported by: 0

README

shellcut

The command like cut(1) on the basis of shellwords.

Motivation

  • Find rows from access logs of load balancers
    • That logs separated values by spaces but also has quoted values too

Installation

$ go get github.com/mackee/shellcut

Usage

$ cat access_logs.txt | shellcut -f 1-10 -g 1=h2
  • -f - indices on a field for output. 1-origin.
    • -f 1,2,3 output first to third field on row
    • -f 1-10 output first to 10th field on row
    • -f - print all fields
  • -g - filter row by field value
    • -g 10=foobar output matched rows that 10th field is foobar

See also

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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