Scripts in /usr/local/bin

These are home-grown scripts (programs) that do
useful things (in some cases, only on the APPM system,)
or useful scripts gathered from the Internet.
They are listed in reverse chronological order, most recent first,
and most are not documented elsewhere.

fixscan

fixscangif

Intended for instructors who wish to post scanned images of handwritten/drawn notes to the web, this script calls the appropriate software to ``clean up'' scanned images and convert them to small efficient grayscale files in PNG format (fixscan) or GIF format (fixscangif).

The latter -- fixscangif -- also gives you the option of combining multiple images into one tall well-compressed GIF image. (Unfortunately, the IE browser does not display a tall PNG image at full size, so fixscan has been stripped of the analogous function.)

simpscan A quicker simpler application along the lines of fixscan, this program converts one or more named image files to simplified (despeckled, cropped) grayscale PNG images with the same names as the original files except with the suffix .png. Instead of using IDL this program uses ImageMagick, which does not compress the resulting PNG as well. You can open and re-save the resulting PNG file with xv to get a smaller file.
spamtrack A script to filter incoming email with spamprobe, a Bayesian analysis engine. Create a file ~/.forward which contains the single line
"|/usr/local/bin/spamtrack"
and all new incoming email will get tagged with a spam score and (optionally) directed to a special ``spamfile'' rather than to your inbox. But don't use it until you have read and understood the documentation for spamtrack and spamprobe; it's not worth using unless you know how to ``teach'' spamprobe!
word A script which runs ``antiword'', a free MS Word document reader, to convert a Word document to plain text or to PostScript (good for viewing with ghostview)
Cf. antiword ( http://www.winfield.demon.nl/)
checklinks For use with web pages (*.html); checks on references to local files -- HTML and image files on Amath -- and reports any errors it finds. Useful for debugging a web page. (For a more comprehensive check, including all links, use LinkScan.)
Cf. weberr
weberr Searches our web server's (amath's) error log for occurrences
of a given string; prints nicely formatted results.
Useful for debugging web pages (after several days of use).
Cf. checklinks
datemail Analyzes the dates of messages in a given email file;
prints a formatted graph showing ages of messages.
(Analyzes /var/mail/$user by default.)
A tool for coping with old email.
Cf. splitmail, mailfile
dvips2txt A script to recover text from a PostScript file which is output of dvips.
It takes advantage of output peculiar to dvips,
and will not work at all with other PostScript files.
USAGE: dvips2txt < dvifile.ps > textfile
latexify Performs some basic substitutions on a plain text file
to convert plain text into LaTeX source material.
Prepends basic LaTeX stuff (which must be edited manually,
e.g., title/author stuff, abstract), and appends \end{document}.
Use as a text filter, e.g.,
latexify < plaintextfile > output.tex
nicelist

niceElist

Converts a "raw" class list, downloaded from SIS in comma-delimited form,
to friendlier form.

nicelist is interactive, letting the user choose which fields
to extract, producing both plain text and PostScript output.
niceElist automatically extracts only email addresses and names,
making a file suitable for use with ``broadcast''. Usage:
    nicelist SISclassfile
    niceElist SISclassfile

maxima
xmaxima
runs public-domain (GNU) version of Macsyma
gcl runs public-domain (GNU) version of GCL
thumbs Makes an HTML file to display all the JPGs and GIFs
and PNGs in your current working directory, in the form
of a 2-column table of thumbnail photos + captions.
You are prompted for the HTML file name, maximum thumbnail
dimension, and all page/cell/text colors. Color may be
specified by name or by hexadecimal code.

Cf. slides

vilearn A tutorial for learning the vi editor.
biggestfiles Runs and filters a ``find'' command which lists the
largest files in the current working directory.
txt2eps Converts text to a zero-page EPS* image in file "textfile.eps"
Baselineskip set to 1.1 by default; may be set to any valuebetween
0.9 and 9.0. Text size scaled to fit page dimensions (with at least
36pt margins);   BoundingBox included!
Usage: txt2eps [baselineskip] textfile

*EPS (Encapsulated PostScript) is the file format for a PostScript image intended for
inclusion in a larger document, and not necessarily printable on its own.

binvi Uses vi to edit binary files:
converts binary file to a text version (using b2a),
puts user into a vi session with that file,
then converts edited result back to binary (using a2b).
naghelp Online documentation for the Fortran NAG library.
splitmail Splits a given email file into separate files, one per message,
all in a new directory ``filename.DIR'' (where
``filename'' is the named email file.
Usage: splitmail filename
Cf. datemail, mailfile
rlab lists the Sun workstations in the Newton Lab (ECCR 257)
with information about their "up time" and current load average information.
This is similar to the information given by the command
``w -u''; see the man page for "w".
mathbg

matlabbg

runs your Mathematica command file, or Matlab M-file,
in the background, at a `nice' priority, with results being
printed to a named results file, so that it can
run continuously even after you log off. Usage:
      mathbg commandfile resultsfile
      matlabbg mfile resultsfile
addmathfonts EPS graphics files produced by Mathematica command Export or Display
may be missing font information. The command produces a copy of the EPS file
with font definitions inserted.
Usage: addmathfonts filename.eps
slides Creates a web-page "slide show" for the PNG/JPG/GIF images in the current directory;
that is, a sequence of web pages, one per image, with
links to next/previous images.
The image files should be named so that /bin/ls lists them in
the order you want them shown. This program creates file
``index.html'' for the intro and first image, and
``xxx.html'' for each additional image file "xxx".

Cf. thumbs

mailfile Outputs summary of mail in file.
Cf. datemail, splitmail
mweb

thes

text-based dictionary/thesaurus inquiry, e.g.,
mweb "va=macro"
mweb "tr=table"
mweb "rh=terrible"

(For more examples, type mweb -h and thes -h)
On APPM workstations, see http://amath.colorado.edu/mw/logo.html

bfold Perl script variation of "fold"
fixtext Unix computers, Macs, and Wintel/PCs differ in the "newline" characters
used to end lines of text. In particular, text created by Macs or PCs,
then downloaded to a Unix system,will either have
a ^M appended to each line (PC), or
be just one huge long line of text with embedded ^Ms (Mac).
This script detects the "flavor" of text, and prompts the user
for which other flavor to convert it to.
nbody On APPM Unix workstations, runs a sequence of animations
showing many (mostly unstable) periodic solutions to the N-body problem
cal3 print out last month, this month, and next month
(from cal program), with today in reverse video
EE Interactive script for ``enscript'' --
an alternative to reading the 1584-line manual page for "enscript"
mailall Interactive script for sending a message to all the
email addresses listed in a file:
user is prompted for the file of addresses, a Subject line,
and the text file to edit/send.
elist non-interactive form of "mailall"
ps2pdf Convert PostScript file to PDF.
mathvis Peter Staab & company's Java Visualization Tool
28 July 1999
/usr/local/java1.2/bin/java -cp /home/student/mathvis/packages MathTool
bp Another text-to-PostScript prettyprinter, but simpler than enscript.
Can take either stdin or file.
For help type     bp -help
2up

2upframe

USAGE:     2up[frame] [-poutputfile] [file]

2up[frame] is a filter that takes conformant postscript input from
standard input (or from file), and produces PostScript output to
standard output or designated file, in which the original pages are
squeezed to 56% the original dimensions, sideways, 2 per page
[with a frame around them]