Assorted Shell Tools

browse svn | home page


Assorted Shell Tools is a collection of scripts and compiled programs that are useful for shell scripting. This package also contains a common include file of various useful functions and variables.

Note that many of these tools are shell scripts that were not written with portability in mind.

This package also contains some miscellaneous items, including assorted.bash for managing websites. However, these will eventually be moved into other projects. These are intentionally not covered in the documentation.


Tool-specific dependencies:


To install, run setup.bash, which is a SimpleSetup installer. By default, it installs to /opt/shell-tools, and thus this step may require root privileges. For options, including the ability to specify an alternate prefix path, run setup.bash -h.


ascii-colorsDemo terminal color escape sequences.bash
bulletsConverts Markdown-style bulleted lists to MediaWiki-style bulleted lists.Some Haskell implementation
cleanupRemove intermediate build files and other gunk from a directory tree.Some Haskell implementation, HSH
daemon-ctlstart-stop-daemon but with extra features.bash, procps
filter-urlsGiven a list of URLs, filter out live URLs or vice-versa.Python
gen-datesGenerate lists of dates.Python
gen-listGenerate lists based on a template string.bash
grep-codeGreps a set of directories.bash, Python
manage-mountsManage a set of mounts.bash
map-symsSearch and replace for a symbol in a set of files.bash, Python
memmonMonitor system resource usage.bash, procps
normalizeGiven a list of numbers, return the numbers normalized to their sum.Some Haskell implementation
randlinesSelect random lines from a file.Python, Python Commons
rmheadRemove the first n lines of a file.bash
rmtailRemove the last n lines of a file. (Same as head -n -$n$.bash
show-envShow the value of an environment variable. Useful for debugging programs that export environment variables to subprocesses.bash
trashMove files to a trash directory and group the trashed files by their removal time.bash
unison-mergeA frontend over unison to make conflict resolutions sane.bash
qwertyxmodmap a qwerty keyboard layout.bash
dvorakxmodmap a Dvorak keyboard layout.bash
refresh-linksKept solely as a reference, since it uses a bunch of interesting pipe redirection.bash
bootstrap- cabalFetch, build, and install cabal.bash


For help on any particular tool, please see the tool’s man page.

Here are a few of the major components in shell-tools.


Library of various general-purpose utilities that can come in handy for shell scripting.


Framework for writing minimal installers that support installation by symlinks, which is particularly handy for development of scripts (scripts because it’s not yet integrated with any build system).


This is a script for helping me publish, in the hopes of getting more into the whole “release early and often” mantra. It takes care of the generation of the project website and publishing this to, and it also packages up and releases the software package.

In both website generation and packaging, the process involves generation of a final README from the source README. For releasing a package, the place to upload the files is determined by the package type (most things default to Google Code, but Python packages are pushed to PyPI, for instance).


Assorted Shell Tools is released under the GNU GPL3.


Copyright 2008 Yang Zhang.
All rights reserved.

Back to