A collection of all kinds of shell scripts

Organisation:Copyright (C) 2008-2021 Olivier Boudeville
Contact:about (dash) hull (at) esperide (dot) com
Creation date:Sunday, August 17, 2008
Lastly updated:Sunday, May 9, 2021
Dedication:Users and maintainers of Ceylan-Hull, version 1.0.
Abstract:The role of Hull is to concentrate various, generic-purpose convenience shell scripts, on behalf of the Ceylan project.

The latest version of this documentation is to be found at the official Ceylan-Hull website (http://hull.esperide.org).

This Hull documentation is also available in the PDF format (see Ceylan-Hull-technical-manual-english.pdf), and mirrored here.


Here are a few scripts, sorted by themes, that may be convenient for at least some users.

Many of them can display their intended usage on the console by specifying them the -h / --help command-line option.

In each category, scripts are roughly sorted by decreasing interest/update status. The scripts that we deem the most useful are described more precisely at the end of this document.

As much as possible, we try to name these scripts functionally rather than in terms of tools, so that the implementation they rely upon can be updated as transparently as possible (i.e. with as little change as possible in the user's habits).

Each script entry is a link pointing directly to the script itself.

Most of them are certainly not rocket science.


Many of these scripts may be a bit outdated, as only a small subset of them are routinely used; rely on them with caution!

And tell us if you would like some of them to be updated.

Detailed description of some frequently-used scripts


wh (for "where"): searches (as a more user-friendly 'find') all files and directories matching <filePattern>, from <starting_directory> if specified, otherwise from current directory.

Usage: wh [-h|--help] [--verbose] [-q|--quiet] [--no-path] [--exclude-path <a directory>] <filePattern> [<startingDirectory>]


[-q|--quiet]: only returns file entries (no extra display); suitable for scripts (ex: for f in $(wh -q 'foo*'); do...)
--no-path: returns the filenames without any leading path
--exclude-path DIR: excludes specified directory DIR from search

regrep: recursive grep for the ones that lack it.

Usage: regrep [-v|--verbose] [-q|--quiet] [-i|--insensitive] [-r|--restructured] <Expression to be found in files> [<Filter on files>]


-v or --verbose: be specifically verbose
-q or --quiet: be specifically quiet, just listing matches
-f or --filenames-only: display only filenames, not also the matched patterns, and if there are multiple matches in the same file, its filename will be output only once (implies quiet)
-i or --insensitive: perform case-insensitive searches in the content of files, and also when filtering any filenames
-r or --restructured: use ReStructured text mode (skip tmp-rst directories, search only *.rst files)

Example: regrep -i 'little red rooster' '*.txt'

See also: ergrep (for searching specifically in Erlang files), pygrep (Python version) and cgrep (C version)


srm (for "secure rm"): stores deleted files in a trash instead of deleting them directly, in order to give one more chance of retrieving them if necessary. Ensures that no two filenames can collide in trash so that all contents are preserved.

Usage: srm <files to delete securely>

See also: emptyTrash.sh

See also

  • the tests subdirectory, for a few tests of specific facilities provided here
  • the mostly-obsolete subdirectory, for the scripts we deprecated


Bugs, questions, remarks, patches, requests for enhancements, etc. are to be reported to the project interface (typically issues) or directly at the email address mentioned at the beginning of this longer document.

Please React!

If you have information more detailed or more recent than those presented in this document, if you noticed errors, neglects or points insufficiently discussed, drop us a line! (for that, follow the Support guidelines).

Ending Word

Have fun with Ceylan-Hull!