kas/filters
1
0
Fork
You've already forked filters
0
Tiny scripts that could [almost] have been one-liners, but aren't
  • Shell 80%
  • Awk 8.4%
  • Makefile 8.4%
  • Python 3.2%
Find a file
2022年07月07日 14:00:53 +02:00
bin Lost the launching sh: now an AWK script 2020年01月20日 16:53:14 +01:00
img Track img/identicon.png 2022年07月07日 14:00:53 +02:00
man Added compiled man pages 2020年01月12日 12:37:06 +01:00
old Stashed unik.py 2020年01月12日 12:04:05 +01:00
tmp Initial commit: is{disjoint,{sub,super}set} 2020年02月09日 12:23:32 +01:00
LICENSE Initial commit 2020年01月11日 17:40:10 +01:00
Makefile Make sure $BINDIR and $MANDIR exist 2020年01月12日 21:58:31 +01:00
README.md Further installation instructions 2020年01月12日 22:06:51 +01:00

Filters

Tiny scripts that could [almost] have been one-liners, but aren't.

  • f - easily select a range of fields separated by blanks
  • sortc - sort unique lines according to their number of occurrence
  • unik - print unique lines, keeping the original sort order
  • uniqc - prefix unique lines with number of occurrences

Requirements

  • awk
  • bash
  • sort

Compiling the manpages from scratch requires

  • scdoc

Using Makefile to install everything requires

  • make
  • install
  • gzip

Install

Install scripts to /usr/local/bin and manpages to /usr/local/share/man/man1:

$ sudo make install

Install scripts to $PREFIX/bin and manpages to $PREFIX/share/man/man1:

$ sudo make PREFIX=/usr install # /usr/bin etc.

— or simply copy everything manually:

$ sudo mkdir -p /usr/local/bin/ # make sure $BINDIR exists
$ sudo cp -fax bin/* /usr/local/bin/
$ sudo mkdir -p /usr/local/man/man1 # make sure $MANDIR exists
$ sudo cp -fax man/*.1 /usr/local/man/man1/