Reinier Post's commandline scripts
This collection of commandline tools for Unix variants
is mostly a legacy of my former employment as a
Unix sysadmin - although
hardly any of the specialized sysadmin tools are listed here.
Most have been used on Linux, FreeBSD, Cygwin and Solaris;
and most take the -h argument as a help option.
There's an uncompressed tarball if you like.
- add - replace numbers on lines with cumulative totals, per column (can be a useful postprocessing step)
- aggr - aggregate numbers on the input lines - a generalization of add
- allcharstwice - print only the lines in which every character occurs exactly twice - see also isograms
- append - append a file to another
- a42a5 - print-on-2-pages PostScript filter
- bodyof - strip headers and quotes from e-mail/Usenet messages
- collatz - print positive numbers with the lengths of their hailstone sequences
- copy-skype-shots - copy images from one directory to the other, renaming them and keeping one copy for each
- count - count numbers of identical lines in input
- csv2dot - convert comma separated values to dot format for visualization
- csvcombine - combine several comma separated value files into one
- csvtrans - perform various transformations on directed graphs represented as comma separated value files
- dbinstkeys - list key constraints satisfied by a database instance (work in progress)
- diffall - diff among a whole set of files
- diffcluster - which files in a set are equal
- deword-html - somewhat clean up Microsoft Word HTML (proof of concept)
- envperl - change header (shebang line) of Perl scripts so they work in a Unix/Linux environment
- rightperl - change header (shebang line) of Perl scripts to point to the presently selected version of Perl
- right - a generalization (right perl is rightperl)
- except - print lines in first file that do not occur in second (even when the files are not sorted)
- only - print lines in first file that also occur in second (even when
the files are not sorted)
- flip - solve the 24 game (which was played with "flippos" ("pogs")) when this script was written)
- get-swf - download the Flash application embedded in an HTML file (if any) (I wrote this to collect Flash games on a USB stick)
- getmailaddr - get email addresses from text file(s) (quick & dirty)
- geturls - get URLs from text file(s) (quick & dirty)
- grep-mbox - select messages from a Unix mailbox file
- hdr2col - "flatten" headers in output that uses them, such as ls -R
- img2bb - generate bounding boxes for use with images for LaTeX
- img2eps - convert images for use with LaTeX
- ipnum2name - convert IP addresses to DNS names in input (convenient for webserver logs etc.)
- impatiently - impatiently execute a command line (aborts when output does not appear soon enough)
- innosetupfiles - generate an Inno Setup listing of files
- isograms - print the words in the input in all characters occur equally often - see also allcharstwice
- length - prepend each line with the number of bytes on it (minus line end characters)
- ln-r - recursively replace files in one directory tree with links to the corresponding files in another, when identical
- loo - count lines and characters, like wc, but ignoring whitespace
- mailmanage - reconfigure Mailman mailing list settings
- mimetypes - sort and print MIME type mappings collected from various sources
- mysql-rename-tables - systematically rename tables in a MySQL database dump (not foolproof!)
- rawlinsonize - munge text in a way that leaves it surprisingly readable, as first observed by Graham Rawlinson
- shortest - omit input lines if a prefix of them also occurs as an input line
- previsprefix - similar, but more specialized
- paths2tree - print a (sorted) list of paths as a tree
- phprefs2dot - generate a(n approximate) call graph for PHP applications (quick & dirty)
- procmailsum - summarize a procmail logfile
- rm0 - rm unless nonempty
- repair-with - apply a text filter as an in-place edit on a list of files (generalizes tidy-us)
- rshall - execute a command with ssh on multiple hosts
- substrings - which lines in the input are substrings of which other lines
- splitx - split input into files by regular expressions (only because I did not know about csplit)
- tidy-us - apply tidy to a list of HTML files
- tex-clean - remove files generated by the LaTeX build process (originally by Tom Verhoeff)
- undup-mbox - select and de-duplicate messages from a Unix mailbox file
- selectmail - the same, but with a real mailbox parser behind it
- vncdisplay - return the display number for a VNC server, starting one if none was running
- websearch - a very old handcrafted command line Web search tool
- words - print the normalized words in the input
- wordgen - primitive word generator (varies on words supplied on input)
- xchatlogsplit - split a set of xchat logfiles
- xchatlog2body - leave only the body text in xchat logfiles
- printable - leave only printable characters - useful in combo with xchatlog2body
- factoids - generate "factoids" an infobot can use, in a way similar to how an infobot does it - useful with the xchat log processing scripts
- uniqer - remove duplicate lines from text files (like uniq) even on unsorted input
- zip-r - archive one or more files/directories into a ZIP file with the expected name
- xpath - evaluate XPath queries on XML documents
- xref - list cross-references of terms (i.e. file names or derivations of them) in collections of files
Author: Reinier Post. Use and redistribution permitted,
but entirely at your own responsibility. Publication/distribution of modified
versions permitted provided that any such modifications are communicated
to me first.