Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richmit/linesets
Set theoretical operations with the lines of files
https://github.com/richmit/linesets
Last synced: about 2 months ago
JSON representation
Set theoretical operations with the lines of files
- Host: GitHub
- URL: https://github.com/richmit/linesets
- Owner: richmit
- Created: 2022-12-09T05:26:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T05:31:06.000Z (about 2 years ago)
- Last Synced: 2023-11-18T15:25:23.580Z (about 1 year ago)
- Language: Ruby
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
Set theoretical file comparison and manipulation
I frequently want to do set theory things with the lines in a
file. For example, I might have a set of files each containing a list
of installed packages on a machine, and I want to know things: 1) what
packages are installed on all systems (set intersection), 2) what is
the list of all installed packages (set union), 3) what packages are
only installed on machine A (set difference), 4) etc… These tools
facilitate such computations (see the script documentation for more
examples).- =lineSetOp.rb= ::
A ruby script that can do many different kinds of set theory
computations. Each "set" is defined by a file with the set
elements being each line of the file.
- =lineMapDiff.rb= ::
A ruby script similar to =lineSetOp.rb= but it operates on maps
(ordered pairs) instead of sets, and only preforms a kind of set
difference.
- =uniq.rb= ::
A "stable" version of the UNIX command =uniq= that doesn't require
a file to be sorted to work. It spits out the first occurrence of
each line.