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:Wednesday, October 13, 2021
Dedication:Users and maintainers of Ceylan-Hull.
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).

These scripts are intended for all kinds of Unices, especially GNU/Linux, yet most of them are believed to work on Windows as well, provided a relevant context exists there.

Each script entry is a link pointing directly to the script itself. They may be directly obtained as a whole from the Hull repository.

Most of them are certainly not rocket science.


A few of these scripts may be a bit outdated, as not all of them are daily used; rely on them with (a bit of) 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: empty-trash.sh

Shell Configuration

One may also have a look at our related Ceylan-Heavy's generic, flexible shell configuration (namely .bashrc* files).

Windows Support

The idea here is to go another route than using the highly-integrated graphical tools available there, but to replicate on Windows the Unix tools we know and like (albeit in a somehow less efficient form).

Here are the choices that we recommend:

Our shell configuration and our Emacs' one support natively the Windows platform as well.

Most of the Ceylan-Hull scripts should be operational in such a context.

See also


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!