These utilities are free. There is no guarantee, and use them at your own risk.
Perl script to run batches from a shared directory. I wrote this program as a very simple and limited remplacement of the qsub command. Example of usage:
$ dobatches 'batch-.*' arg1 arg2 arg3
As you can see, the first dobatches argument is a regular expression, not a file pattern (i.e., write .* instead of *).
Zsh script to connect to a remote machine with the rlogin protocol and set the DISPLAY variable. The .zshenv, .cshrc or equivalent file on the remote machine needs to be modified accordingly. This script can now be used as an autoloaded function.
Note: For security reasons, the SSH protocol (command ssh or slogin) should now be used instead of rlogin; however the link is kept, as dlogin can be used as a simple example of Zsh script.
Perl script providing advanced stream filtering and redirection to several files. Supplied in the archive: a filter to colorize the output of make, and shell scripts to send the warnings to an xterm or zenity window.
Perl script giving information about local users. I wrote it because the finger command (on Solaris) was too slow and buggy; I took the opportunity of giving some additional pieces of information. This script was first written for Solaris and NIS+, then modified to run on some versions of Linux and OSF1; it will not work on some systems. Man page for efing (nroff format).
Perl script forwarding mail messages by SMTP to some given address. It does not use the local SMTP client (generally invoked as sendmail), so that the local queue can be bypassed (this is useful if it is full of mailer-daemons due to some spam attacks). Documentation in the POD format is included in the script.
Zsh function/script that outputs all the header files included by gcc. See the page dedicated to gccheaders.
Perl script displaying idle times for kbd, mouse, the tty's and the pts (pseudo-ttys). This program may not work correctly on every system. However it has been tested on some versions of Solaris, Linux, OSF and Mac OS X. Man page for idle (nroff format).
Updated on 23 April 2006.
Perl script to temporarily and automatically stop calculation processes that run on desktop machines, when someone uses a machine. Indeed some machines make a lot of noise when their processor is busy. This utility can take into account the fact that there can be several machines in a room. See the page dedicated to idlexec.
Perl script to create or update symbolic links to static libraries. This script may be useful to compile and link programs that do not provide a configure script, only a Makefile, and need to link with static libraries (for efficiency reasons), e.g. BaCSeL. The reason is that for compilation and conventional linking, one can use environment variables, such as C_INCLUDE_PATH, LIBRARY_PATH and LD_LIBRARY_PATH, but when one wants to link with a static library, one needs to either provide the full path to the library file or use non-standard compiler flags in the Makefile, i.e. which may not work on some platforms. This script makes the (recommended) former method a bit easier.
Example with BaCSeL:
$ ./liblinks lib libgmp.a libmpfr.a $ make GMP=. DEFS="-DUSE_DPE -DZUSE_MPZ -DVBSE -DAUTOMATIC"
Perl script colorizing the output of the make command. If your shell is zsh, you can use it automatically by adding the following line to your .zshrc:
make()
{
local -a pstatus
command make "$@" |& makefilter
pstatus=($pipestatus)
# If make has failed, return its exit status.
[[ $pstatus[1] -eq 0 ]] || return $pstatus[1]
# If eet has failed, return 125; otherwise return 0.
[[ $pstatus[2] -eq 0 ]] || return 125
}
Warning if you want to compile a Linux kernel! This will make make menuconfig fail with a strange error message (the makefile is poorly designed, IMHO).
Perl script checking that a procmailrc file (supplied as argument or on the standard input) is correctly formatted and does not contain suspicious constructs. In case of failure, pmchecker returns with a non-zero exit status and outputs a message to the standard error. This does not mean that there is really an error in the file, but one needs to be a bit paranoid to avoid losing mail (this occurred twice in my case, before I wrote this script). Of course, pmchecker can't detect all errors, but a missing continuation backslash or a bad use of < or > before a regular expression should be detected in general.
Users who manage their procmailrc files with Subversion may want to use this script in a pre-commit hook, e.g.
for i in `$SVNLOOK changed -t "$TXN" "$REPOS" | \
sed -n 's/.* \(.*procmailrc.*\)/\1/p'`
do
$SVNLOOK cat -t "$TXN" "$REPOS" "$i" | pmchecker || exit 1
donePerl module allowing the Apache web server to read the encoding of XML documents, in particular XHTML documents, and to generate the associated charset in the HTTP headers. Tested with Apache 1.3.26 to 1.3.29 and mod_perl 1.26 to 1.29 under Debian GNU/Linux.
To use this module, you need to modify the Apache configuration (in my case, the /etc/apache/httpd.conf file). If it has not been already done, you need to enable mod_perl by adding something like:
LoadModule perl_module /usr/lib/apache/1.3/mod_perl.so
With Debian, this is now configured with the apache package. Then, for the module itself:
<IfModule mod_perl.c>
PerlTaintCheck On
<Location />
PerlFixupHandler ReadEncoding
</Location>
</IfModule>
Thanks to Patrick for his invaluable help.
Perl script to post news articles and retrieve the new ones with Suck, for the INN users. To use this script, you need to:
set the environment variable ISP_NNTPSERVER to the remote news server (new: or give the server as an argument);
change the values of some variables in the script (the values to use depend on your system);
set this script to setuid and setgid news.
Note: The current version has been written for the Debian GNU/Linux distribution and INN 2.3.2. Versions older than 2006-03-10 suffer from security problems (on multi-user machines).
Wrapper to the editor for the Subversion client svn, whose goal is to remove trailing whitespace and trailing newlines from log messages.
OpenOffice / OpenDocument text documents to plain text converter, based on Liam Morland's (see the source of this Perl script for the changes I've made). The generated text is encoded in UTF-8. Note that this converter is very basic; lots of features are still missing. To be able to use this program, you must have either the Archive::Zip Perl module or the unzip command.
Note: Though I mention this program on this page, it is not specific to Unices (but I haven't tested it on any other system).
This script is also distributed with Wolfgang Friebel's lesspipe.
Perl script that processes diff output, in particular when it will be sent to a terminal: this utility can colorize it and convert it into UTF-8. I wrote it as a replacement for Dave Ewart's colordiff. In addition to UTF-8 conversion, the main advantage over colordiff (currently 1.0.6) is that tdiff starts to process the stream immediately (while colordiff first needs the stream to be closed).
Perl script displaying the process list as a tree. This script uses the ps utility; options for tps start with character :, the other arguments being passed to ps. No help file (tps is an old script which should be rewritten), but you can look at the source and snapshots: snapshot 1, snapshot 2.
The purpose of these scripts is to type the passphrase only at the first SSH connection from the concerned machine. The passphrase will not be asked just after you log to this machine; so, if you do not use SSH for this session, you will not need to type your passphrase. The passphrase will be forgotten only when the last zsh login shell terminates.
Software that does not depend on a graphical interface:
The Perl language.
Mutt: the best e-mail user agent (see also my Mutt pages). And Procmail, to filter your mail.
Subversion: advanced version control system.
And if you use the XWindow graphical interface (like X.Org):