Ash is a small shell which resembles the System V `sh'. Its power
resides in its size and its compatibility:
- It's about 66k (less than half the size of the Korn Shell), so it eats
less memory when it forks itself to run other commands.
- It's sh-compatible -- I use it to run `configure' scripts, and as a
complement to `make'.
- It only uses simple file read/write operations, no termcap, no ioctl,
no termio. Thus it works nicely under Xterm.
- I maintain it myself together with Autoconf. This way I try to keep a
`porting package' up to date -- whenever I find a new feature in Autoconf's
scripts that confuses Ash, I put myself to work to fix it.
However, you should notice the following points before downloading Ash:
- Ash forks itself to run commands. Thus Ash does not work on DOS,
and OS/2 or NT are needed.
- Ash should work with RSXNT but I could not test
it due to the lack of an appropiate environment. For instance, you might need
to fix `makefile.os2', as it uses the -Zcrtdll option to make
Ash smaller (64k) and I'm not sure whether RSX supports it.
Now, let's proceed with the installation.
Ash is compiled with the EMX library and tools. It's a binded executable
so you'll need to install at least the EMX or the RSXNT runtime environments.
They can be reached both in Leo (ftp.leo.org, www.leo.org) and Hobbes
(hobbes.nmsu.edu).
Ash may reside in any directory that is mentioned in the PATH variable.
You must make sure that Ash is the shell that get's executed when you
simply type sh.exe on the command line -- if you have the
sh.exe Korn Shell active, you may loose some of Ash's functionality.
Currently Ash is configured to act as a login shell when invoked with
the `-l' option: then it reads $INIT/profile (or $ETC/profile
or /etc/profile) and $HOME/profile (or
/home/profile). The lack of any or both of these files causes no
error condition, and these files are not processed unless the `-l' option
is used.
There are some useful scripts in the ./funcs directory. You're
free to place them anywhere, as they're not executable files.
OK, nobody's perfect and me less than anyone else. I know the
previous releases of Ash did have bugs, but I was so excited to get such a
simple and easy to port shell that... Well you know.
Here are the most important bugs fixed since the last patch release:
- Added support for *.cmd and *.com files.
- Fixed a few bugs in the program search algorithm. Now it works as stated
in this document.
Here's a summary of known bugs and features that Ash has or lacks when
compared to other sh-shells:
- Background processes work more or less as expected: they stay in the
same session and output to the same screen as the shell. This is the way
things work under Unix and is pretty nice for running programs under X.
However, under OS/2 there are programs that access the video/keyboard
hardware directly and thus mess the session: for instance, try
"tedit &" from within Ash --it will cause the editor to pop up, but
the editor will not grab the input until you first enter one command to
the shell.
- EMX's function exec doesn't choose the appropiate mode for
PM programs and thus they cannot be run from within Ash. You should define
a start function
start() { cmd.exe /c start $* }
add it to your profile ($HOME/profile, $INIT/profile, etc), and use it with
PM programs.
- Currently, ~ is not substituted by $HOME.
- No PWD is defined. This may cause some problems with scripts that
assume it has some value. However, up to date I've found none -- most of
scripts use the `pwd' command instead and this one is
already in Ash.
- Ash has several built in commands that take precedence over external ones.
The search for programs follows this rules:
- If the program has an extension (EXE, COM...) no one
is added and Ash looks for that name in $PATH.
- If the program has no extension, the precedence is: [builtin] >
exe > com > cmd > [no extension].
As you see, to avoid using a built in command you have to explicit the
program extension, i.e., echo.exe would look for GNU echo and
execute it, or fail if not found.
- echo is a built-in command and understands both `-e'
and `-E' options, assuming they have the same meaning. This differs
from GNU echo, which ignores `-e'.
- There's a plethora of small builtin commands that still have to be
tested (For instance `test' is one :).
- Support for mail checks is conditionally decompiled to make the program
smaller. Have a look at `shell.h' to see what is out.
If you're lucky and I could find space enough to upload it, Ash
should be together with these HTML scripts:this is the zip file (over
220k)
Ash should alse be in Hobbes and
in Leo, but those copies may
be outdated (Check the "incoming" sections or directories for new copies I
migh have uploaded to the servers).