yet-another-sort

command module
v2.0.0-...-889289b Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

Yet-another-sort

A sort util that mimics the functionality of GNU sort

Build and test

Introduction

This project leans heavily on, and aspires to eventually reach full feature parity with, GNU sort. The goal of this project is to experiment with additional features that are not part of GNU sort.

The main purpose of this program is to write sorted concatenation of all file(s) to standard output.

Multiline Support

The user can specify how many lines yet-another-sort should consider as one multiline unit. For example, the following input:

$ cat input
b
1
a
2

can be sorted 2 lines at a time with

$ yet-another-sort --multiline 2 input
a
2
b
1

This can be useful when sorting something like a timestamped bash history:

$ cat .bash_history
#1692484702
history
#1692484723
ls -lah
#1692484726
git status
#1692484733
history
#1692484737
ls
$ cat .bash_history \
  | yet-another-sort --multiline 2 --key 2, --uniq last \
  | yet-another-sort --multiline 2 --key 1
#1692484723
ls -lah
#1692484726
git status
#1692484733
history
#1692484737
ls

Installation

Get it from the Snap Store

The program can also be installed via a regular Ubuntu package (on Jammy, Lunar, Mantic, or Noble):

sudo add-apt-repository ppa:nicolasbock/yet-another-sort
sudo apt install yet-another-sort

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