README
Most of my Perl programs have a comment at the top explaining what
they do; also look at ~ed/.bashrc for more strange stuff.
Only those files which are not part of projects of Freshmeat are
documented here. I plan to package these up eventually.
add_line, remove_line: see .
ao: see .
bak: too peculiar to the Dept of Computing environment, moved to junk/.
bash: gone
check_perl: wrapper around perl -c (check syntax), which munges the
messages to be more Unix-like (no news is good news). Moved to junk/.
diffall: diff multiple files, not just two. Actually, this just diffs
each file against the first. Most useful with the -q flag to get a
quick check of whether several files are all the same. Moved to junk/.
doo, door, least_loaded, gtop, initchain: too DoC-specific, gone.
e: run an editor (based on $EDITOR and other vars). Falls back to vi
if preferred editor not found.
find_multi: wrapper for find(1) when you want to quickly find lots of
different things in several places. Removed when I realized find can
take multiple directories anyway.
fix_rpm_remove: Uninstalling a package with RPM won't remove any files
which have been gzipped. This program processes RPM's error output
and gets rid of any gzipped files it didn't remove. Moved to junk/
from: Use
instead, or look in junk/.
get_picon: Use the picon search service at Indiana University to
locate the best picon for an SMTP address. Output the URL of a GIF
file to standard output.
There is a cache to avoid excessive load on Indiana's server; however
this is just a flat text file which grows and grows. You might like
to occasionally delete or trim the file by hand, both to stop it
growing too large, and to force a refresh of cached data.
This program has moved to for the
time being.
getem: interface to wget for downloading many files with less typing.
Needs a text file which is a list of URLs, except that you can say
BASE=whatever (a string to prepend to every line) and EXT=whatever
(append). Somehow, this was easier than 'copy link location' from
Netscape...
Moved to junk/.
gw: too DoC-specific, gone.
halfway: given two lines of text which contain numbers, print a line
which is halfway between the two (average of the numbers in
corresponding positions). I wrote this to help me generate XFree86
modelines, when I want a new mode halfway between two existing modes.
Moved to .
htmlformat: quick and dirty pretty-printer for HTML files. Crude but
effective. Moved to junk/.
java: ever wondered why the 'Windows' look-and-feel for Swing is
disabled on Linux? I can't see any good reason not to use it, so this
wrapper for the java executable enables it by setting the os.name
property. It also sets properties for the http and ftp proxy servers
based on environment variables.
Moved to .
lesspipe.sh: my lesspipe.sh, based on Slackware's. I ought to
contribute this back.
link: generate an HTML page linking to a URL or filename. Quick - I
have a URL and I want to make a page that does nothing else but link
to it! It was useful once, I can't remember why.
Moved to .
links: print out all links in an HTML document. Also known as 'the
first example from the HTML::TokeParser manpage'. Unrelated to the
web browser of the same name. Moved to
.
mean: read some numbers (one per line) and print the mean.
msg_anal: isn't it annoying when someone posts a message which has a
hundred irrelevant quoted lines and then one line of 'me too'? Or a
huge signature? Now you can fight back at these people with
statistics - msg_anal counts the number of lines of quoted, original
and signature text in a message body. The name stands for 'analyse'
:-). Moved to .
nfsmnt: mount something via NFS, in a standard mount point
(/mnt/nfs/$host/$dir). So you just say 'nfsmnt host:/export1' rather
than a long mount command. I did have a better version of this, but I
lost it. Moved to pending a
rewrite.
numsort: Sort stdin by lines, except that sequences of digits are
sniffed out and compared numerically rather than lexically. Useful
for sorting things like 'foo1, foo2, ..., foo10, foo11, ...' which
normal sort wouldn't get right. I think there is another program to
do this, but I've forgotten its name. My version is in Haskell and
requires my library Misc.hs... it's moved to
until I redo it in Perl or
something. (Or ideally, change the standard sort(1) command.)
parr:
Parallelize a command semi-intelligently, eg:
% parr gzip -d *.gz
will use both processors on a texel, by running two jobs in parallel
each with part of the argument list. It doesn't work for all
commands - only those where files can be processsed independently of
each other.
Moved to .
pathmerge: used heavily in my .profile, this adds new elements to the
end of a path, but only if they're not in there already.
pd: parse dates entered on stdin, and output them in standard
(bigendian) form. This is a wrapper around Perl's Date::Manip which
could be useful in shell scripts where the user must enter a date.
I've submitted this to the Date::Manip maintainer for possible future
inclusion.
pmv: print the installed version of a Perl module. For example
'pmv DB_File'. I also have a script which uses this to print the
name and version number of _every_ installed module, which is most
handy when upgrading from one Linux distribution to another (check
that none of the Perl modules have been lost or downgraded).
Moved to .
qdi: quick and dirty indent; lines containing 'ENTRY' increase the
indentation level, lines with 'EXIT' reduce it. Used to process trace
files (see also colour_trace on Freshmeat).
Moved to .
qunzip: wrapper for unzip to make it more Unix-like (just print the
filenames, thank you). Moved to
but I would really like to modify unzip itself for this. There
doesn't seem to be any open development forum for testing that idea
though.
race: try to break a program by running a thousand copies in
parallel. This should find most race conditions with file creation
and other things. Moved to .
rename_sent_mail: Pine's sent-mail folders have silly names: they
don't sort lexically. This renames them to YYYY-MM-sent-mail.
I have asked the Pine maintainers to consider saving in this format to
start with. But really I ought to stop using Pine and switch to Mutt
or Gnus.
ukh: remove a host from your ssh known_hosts file (more convenient
than opening it in an editor). Would be better if ssh offered to
forget the old key and store a new one.
user_home_pages: see .
check_html, weblint, weblint-devel, tidy: set of HTML 'lint' programs.
Anyone know where the weblint maintainer has gone to?