uc

command module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

GitHub Actions CI Status GoReportCard codebeat badge GitHub Actions CodeQL Status

Usage demoInstallationCommand-line completionUsageContributingLicense


uc is a simple utility for counting unique lines.

Usage demo

demo

Installation

From sources

To build the uc from scratch, make sure you have a working Go 1.19+ workspace (instructions), then:

go install github.com/essentialkaos/uc@latest

From ESSENTIAL KAOS Public Repository

sudo yum install -y https://yum.kaos.st/kaos-repo-latest.el$(grep 'CPE_NAME' /etc/os-release | tr -d '"' | cut -d':' -f5).noarch.rpm
sudo yum install uc

Prebuilt binaries

You can download prebuilt binaries for Linux from EK Apps Repository.

To install the latest prebuilt version, do:

bash <(curl -fsSL https://apps.kaos.st/get) uc

Command-line completion

You can generate completion for bash, zsh or fish shell.

Bash:

sudo uc --completion=bash 1> /etc/bash_completion.d/uc

ZSH:

sudo uc --completion=zsh 1> /usr/share/zsh/site-functions/uc

Fish:

sudo uc --completion=fish 1> /usr/share/fish/vendor_completions.d/uc.fish

Man documentation

You can generate man page for uc using next command:

uc --generate-man | sudo gzip > /usr/share/man/man1/uc.1.gz

Usage

Usage: uc {options} file

Options

  --dist, -d            Show number of occurrences for every line
  --max, -m num         Max number of unique lines
  --no-progress, -np    Disable progress output
  --no-progress, -np    Disable progress output
  --no-color, -nc       Disable colors in output
  --help, -h            Show this help message
  --version, -v         Show version

Examples

  uc file.txt
  Count unique lines in file.txt

  uc -d file.txt
  Show distribution for file.txt

  uc -d -m 5k file.txt
  Show distribution for file.txt with 5,000 uniq lines max

  cat file.txt | uc -
  Count unique lines in stdin data

Build Status

Branch Status
master CI
develop CI

Contributing

Before contributing to this project please read our Contributing Guidelines.

License

Apache License, Version 2.0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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