Martin Väth's Homepage

CV

List of Publications

International Research Experience

Teaching Experience

->Activities on Github

Utilities and programs

->Summary at the Czech Academy of Sciences

Impressum+Datenschutz

->Valid XHTML 1.0 Transitional

Utilities and Programs by M. Väth

This page contains some of the programs and utilities which I have written. Some of them are about 20 years old, but others are rather new.

Most of the newer programs and utilities which used to be on this page are now maintained as Git repositories on ->Github.
Note that even if you do not have git you can download the corresponding tarballs from GitHub by choosing the "Tags" for the required revision.

As a reminder, this page still lists some projects which can now be found in GitHub.

The license for the packages on GitHub is listed in the packages.
For the other packages on this page there is the following ad-hoc license (which I might change for a particular package if you ask me):
You may download and modify these programs for your private use. If you make an interesting modification, I ask you to mail me a copy.
You may also distribute these programs unmodified in any form you like.
If you want to use them in a commercial environment, or if you want to distribute a modified version, please contact me.


Last changes: February 19, 2017
  • Download page: Some .spec files for SuSE 9.2 (last update: December 6, 2004).
  • Download page: Contributions to Gentoo (last update: January 7, 2012).
  • Download page: Packages for TeX and LaTeX (last update: April 19, 2016).
  • Download page: Magus for SuSE 9.2 (last update: January 7, 2006). Since I switched to Gentoo, I do not update this anymore. For Gentoo, you find ebuilds in my mv overlay.
  • ->less-select (on GitHub since March 2, 2012). With this patch you can select files (or other content) interactively from a list, using the less program. A perl script making use of this feature and executing certain commands on the selected files is also provided.
    The most convenient way to install this patch for Gentoo is to emerge the less ebuild from the mv overlay.
  • ->pyrep (on GitHub since March 2, 2012). (Python regular expression). A python variant of the perl script plrep from the mv_perl script collection.
  • ->mv_perl (on GitHub since March 1, 2012). A collection of some perl scripts and corresponding zsh-completion. There are scripts for interactive replacement/search in files, comparison of files and directories, storing/restoring/comparing directory hierarchies, manipulating directory hierarchies, manipulating timestamps, finding duplicate files, ...
    The most convenient way to install these scripts for Gentoo is to use the ebuild from the mv overlay.
  • ->comp (on GitHub since May 15, 2016). A perl script for comparing directory trees, including metadata. A forerunner of this script is in the mv_perl script collection (now being renamed to comp-old), but it has undergone a ground-up rewrite and redesign is now maintained as a separate project.
  • ->push (on GitHub since May 04, 2012). A POSIX shell function to treat a variable like an array, quoting args. This is used by many of the shell scripts found on this page.
    For Gentoo users: An ebuild for this script is available in the main Gentoo tree (app-shells/push).
  • ->bzwc (on GitHub since January 29, 2012). This is a POSIX shell wrapper for wc which decompresses .gz, .bz2, .lzma, or .xz files before sending them to wc. All options of wc can be used, and as for usual wc, it is possible to pass several files as arguments. For standard input, the name of the command (bzwc, lzwc, or zwc) determines whether .bz2 .lzwc or .gz data is assumed. A zsh completion file is provided. This script needs the push function.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->mv_emacs (on GitHub since March 1, 2012). A collection of some Emacs Lisp (.el) scripts which should run with all newer versions of Emacs or XEmacs (Lucid Emacs).
    The most convenient way to install these files for Gentoo is to use the ebuild from the mv overlay.
    • block.el. The standard Emacs treatment of the region is rather different from that of many of the classical text editors. In many other editors a "block" can be marked explicitly which exists independent of the current cursor position and independent of the buffer. This package is an attempt to emulate this behaviour by providing such a block and making it act as if it were the region.
    • kbdmacro.el. This package provides an intuitive way to define keyboard macros (during runtime) and bind them to keys. The old meaning of the keys is remembered and can be restored. It is also possible to save all recorded macros into a file.
    • verify.el. This package provides the single command verify which allows to verify conveniently whether and where the buffer was actually changed since its last "save".
  • ->archwrap (on GitHub since January 29, 2012). A collection of some POSIX shell scripts which invoke various archivers like (s)tar/bzip2/zip/... in an automized manner (e.g. to invoke all archivers and keep only the smallest archive, to unpack an arbitrary archive into some subdirectory, to repack archives, to pack to remote host etc). These scripts need the push function.
    The most convenient way to install the archwrap scripts for Gentoo is to use the ebuild from the ->mv overlay.
  • looptool.zip (last update: November 21, 2013). A bash script to mount/unmount/encrypt/decrypt filesystems via the loop device. Note that this script allows you to encrypt/decrypt existing devices without using additional storage data. Be aware that this makes use of an undocumented behaviour of encrypted filesystems: Therefore this script might damage your data (even if correctly used) if the undocumented behaviour of either the loop device or of the encryption routine changes. It was only tested at some occassions with twofish on SuSE 9.0 and with twofish256 on SuSE 9.2, and I received no bug reports yet. However, please use with extreme care!
    In the new release, the default values are set for SuSE 9.2 - you must use some flags if you want the previous behaviour.
  • ->emount (on GitHub since January 31, 2012). A perl script to mount/unmount (and to create/remove) dm-crypt filesystems according to your /etc/fstab.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • recovery.zip (Version 1.1) (last update: June 28, 2011). A small but very useful tool if one must use less reliable media like diskettes to store/ship data: To a given file, it generates a small recovery file which can be used to restore the given file after a slight damage, e.g. after the loss of one block of information. (The maximal size of such a block which still can be restored determines of course the size of the recovery file). In contrast to other utilities, it is not necessary to convert the original file into some special format: The original file can be shipped unmodified, one just has to ship the small recovery file in addition.
  • hocp.zip (last update: June 5, 2000). This is an ancient program for calculation with arbitrary precision. The archive contains a subdirectory calc_c in which there are two C libraries for calculation of elementary resp. transcendental functions with arbitrary precision. The main directory contains a Makefile which generates the program hocp. This program provides an interactive language to some of the library functions which is powerful enough to write small programs. The language is an extension to the language hoc which was described by Brian Kernighan and Rob Pike in their book Der UNIX-Werkzeugkasten. All documentation is in German.
  • calc.zip (last update: June 5, 2000). A C++ library for arbitrary precision. Also very ancient. All documentation is in German.
  • schach.zip (last update: June 5, 2000). This is a very ancient library for chess with a demo program for chess problems (mate, selfmate, and helpmate) which can find cooks. Originally, it was written for the C64 and 6510 assembler, later reimplemented in C. Do not use it:
    To train myself, I have recently written a new chess and ->chessproblem library/demo program in C++11 in about 1 day (+ about 1 day for testing/debugging). I spent some more time to make it multithreaded. This new library/project is much more efficient and simpler to use than the ancient library.
  • quintris.zip (last update: November 9, 2003). Everybody knows Tetris. But this little game is different. This .zip contains only a small executable for DOS and (new) for Linux (it should run on all i386 linux systems but needs an 80x25 color terminal to display well - I just crosscompiled without much porting). This game was a very short project with my brother many years ago to learn a new programming language.
  • ->sshstart (on GitHub since February 13, 2012). A frontend for ssh-add and ssh-agent which asks you for the passphrase automatically but only the first time you run ssh and friends. The keychain script is supported if it is available (a reasonable new version of that script is required). This script needs the push function.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->video-mv (on GitHub since February 12, 2012). A shell frontend for mplayer/mencoder and alsa to record movies from TV or to re-encode them (possibly with several passes). This script needs the push function.
    The most convenient way to install these scripts for Gentoo is to use the ebuild from the mv overlay.
  • ->sudox (on GitHub since December 19, 2011). This script is similar to sux. It is a wrapper for sudo which can transfer X authority data (optionally generating "untrusted" permissions). In addition, some support for screen and tmux is provided, taking care of tty permissions. For a description, use ./sudox -h or ./sudox -?. A zsh completion file is also available. This script needs the push function.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->firewall-mv (on GitHub since February 2, 2012). These POSIX scripts set some typical iptables commands for a dialup PC, optionally including a simple portknocking solution and router functionality. The usage is somewhat similar to SuSEfirewall2, but the approach has some essential differences. In particular, packets are usually not DROPed but REJECTed until a rate-limit is reached. It is not necessary to restart the firewall after a connection is established. The setting of the kernel variables is done with a separate script. Currently, IPv6 is not supported by the script. This script needs the push function.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->starter (on GitHub since January 30, 2012). This script can be used to schedule commands in a multitasking and multiuser environment. Commands started with this script will wait with the execution until all earlier commands started earlier with this script (possibly by a different user) have been executed. You can also have several of such command queues or add a command to a queue even if you start it immediately. There is also a wrapper script which may be used to queue shell-commands. The archive contains also a corresponding (experimental) zsh completion file. This script needs the push function.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->diffhelp (on GitHub since February 4, 2012). A POSIX script acting as a frontend, beautifier, and path-fixer for diff -u.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->cpi (on GitHub since February 3, 2012). This is a somewhat verbose frontend for cp -ia: For each file you see the differences before you confirm/reject the copying.
    The most convenient way to install this script for Gentoo is to use the ebuild from the mv overlay.
  • ->set_prompt (on GitHub since February 17, 2012). A collection of scripts to get an intelligent prompt for zsh or bash with status line display.
    The most convenient way to install this project for Gentoo is to use the ebuild from the mv overlay.
  • ->runtile (on GitHub since May 4, 2012). Two simple scripts to run commands and set the hard status line (windows title).
    The most convenient way to install this project for Gentoo is to use the ebuild from the mv overlay.
  • ->zram-init (on GitHub since March 2, 2012). This is a small helper script to setup a zram device as swap or as a ramdisk. An experimental zsh-completion file and openrc init-scripts are also provided.
    The most convenient way to install these scripts for Gentoo is to use the ebuild from the mv overlay.