UN*X Commands for the Amiga
This package is a non-exhaustive port of some useful un*x
simple commands to use with amiga shells or ksh/csh shells.
Used with other Un*X Amiga ports of commands (grep, sed, ...) and original amiga commands, it's possible to make scripts almost as easily
as on a real Un*X or Linux system, and anyway it beats Win95/98/NT script capability :)
The original sources along with other commands can be found
there, except for
the grep command, which is the v2.1 GNU version of the grep command (which was not available on the amiga, since only v2.0 was ported,
and missed the wildcard support).
the strcmp command, which is not needed on Un*X systems, but that I had to write because the IF EQ shell instruction
is not case sensitive.
The commands I've ported are:
- banner: prints your message in huge, rudimentary ascii art.
- basename: extracts filename of a full path. I added the --amiga switch for colon support
- comm: prints common parts of files
- date: prints date. Useful because lots of formats can be used (+%d%y%m,...)
- dirname: extracts dirname of a full path. I added the --amiga switch for colon support
- expand: expands tabs into spaces
- expr: calculates expressions
- fgrep: simple grep, without regexps (added wildcard support)
- fold: splits long lines (wildcard support)
- grep: full grep, search in files with regexps (added wildcard support)
- head: prints beginning of files
- join: join files by criteria (never used it :))
- od: octal dump
- sed: stream editor, search/replace/insert uninteractively and more in files
- shar: make a shell archive (useful mostly for csh/ksh shells)
- strcmp: compares 2 strings. I wrote it because the AmigaShell IF EQ is not case sensitive
- strings: extracts strings from binary files (-a option added to support french accents)
- tail: prints end of files
- tr: translates/deletes characters (ex: tr -d "\015" can convert MSDOS text to UN*X/Amiga text)
- uniq: removes duplicate lines
- unshar: extracts a shell archive
- wc: count words, lines, characters (added wildcard support)
- width: truncate lines
Caution:
When installing some of those commands in your path, maybe you'll have to rename them
because of original Amiga commands called the same way (date,join).
Unless otherwise specified (fgrep, grep, wc, fold), all those commands are direct ports of the original source code,
and that means that the amiga wildcards won't work. Sorry for that, but you can manage to emulate this
(e.g: to do a "uniq #?.txt", do "uniq `list #?.txt LFORMAT %f%s`" or use spat)
I added wildcard support where it was the most useful (ex: grep). I'll try to spread wildcard
support in every program which needs it in the future.