home *** CD-ROM | disk | FTP | other *** search
- MiNT Public Domain KornShell
-
-
- This archive should contain the following files;
-
-
- ksh.tos The ksh executable itself.
-
- ksh.1 an nroff style manual page,
-
- profile.ksh my standard login script as an example
- kshrc.ksh likewise, my shell startup script,
- logout.ksh and logout script.
- pushd.ksh An implementation of pushd, popd and dirs for ksh.
-
- examples.lzh Some other example ksh shell scripts.
- bugs The current known bugs list.
- change.log For those of you with a previous version, this is
- the log of the changes I have made.
-
- readme Eric Gisin's original readme.
- readme.st This file.
-
-
- Installation.
-
-
- This is how I have my software set up, there will be other way's of
- doing this, but this will do as an example.
-
- 1) Copy ksh.tos profile.ksh kshrc.ksh logout.ksh and pushd.ksh into
- the directory with the mint.prg.
-
- 2) Edit profile.ksh and kshrc.ksh so that the paths mentioned match
- your environment. Remember that ksh uses / instead of \ in all of it's
- path related variables.
-
- 3) Either;
-
- i) copy ksh.tos to init.prg.
- ii) edit init.rc to include the line
- ksh -L
- where -L tell ksh to go through it's login routine.
-
- and execute a new mint. If all is well you should be in ksh.
-
-
- Changes from the original Unix version.
-
-
- 1) I've changed the seperator character within the PATH variable from
- ':' to ';' to avoid clashes with drive labels.
-
- eg. use
- export PATH="/bin;/etc"
- instead of
- export PATH="/bin:/etc"
-
-
- 2) On startup ksh will only look for profile.ksh ( in the Current
- directory ) if passed the -L flag, for login, otherwise only the file
- pointed to by $ENV will be executed.
-
- if the parent process id == 0 ( ie. if ksh has been run as init.prg ),
- ksh runs as though it was a login shell, executing ./profile.ksh.
-
-
- 3) You don't have to type the file name extension of a program for ksh
- to find it, ksh now hunts through all the possible executable file
- name extensions ( .prg, .ttp, .tos, .app, .ksh ) to find the program.
- Shell scripts are denoted by the extension .ksh.
-
-
- 4) ksh only accepts unix style pathnames, but it automatically converts
- every / in a programs command line to a \. Now this is just right for
- most progs, however there had to be an exception. Zoo sometimes wants /
- or // on it's parameter line, as does sed. To get around this, I've
- added an extra set option. set -o unixpath will pass the unix style
- commandline through to the sub program. set +o unixpath reset this.
-
- An easier alternative is;
-
- unixpath can now be used as a prefix to a command. This command will be
- executed without the normal unix_to_dos command line conversions. this is
- useful for programms such as zoo or sed that like to see /'s on their
- command line rather than \'s.
-
- ( PATH is also affected by this translation, since most Atari programs
- don't quite know what to do with a / in the path. This is also disabled
- by unixpath ).
-
-
- 5) The ulimit command now works as expected, ulimit can be used to set
- up the child process limit's in a similar way to limit.ttp.
-
- options are
- ulimit [-dmt] [limit]
- where
- -d : set the limit on the maximum Malloc'd memory for a process
- -m : set the total maximum memory allowed for a process
- -t : set the mamximum amount of CPU time allowed for a process
-
-
- 6) The cursor key's now scroll through the history list, and along the
- current line. Insert runs a complete command, and clr/home runs a list
- command, rather like gulam ( but not quite as smart yet ). Undo does a
- kill-line.
-
-
- 7) Ksh is now aware of a few more variables.
-
- CDPATH
-
- CDPATH is now implemented. This gives a search path for the cd
- command, first the current directory is searched for the
- subdirectory, if this fails, then every directory in the CDPATH
- environment variable is also searched for this subdirectory. CDPATH
- is a semi-colon separated list.
-
- to use just type;
- CDPATH="d:/usr;e:/mint"
- etc.
-
- LOGOUT
-
- On exit, the login shell will look for the LOGOUT variable, and
- if set will try to execute the the file named. This means that,
-
- LOGOUT='~/logout.ksh'
- has the same effect as
- trap ". ~/logout.ksh; exit" EXIT
-
- HISTFILE
-
- The history file mechanism is begining to take shape. $HISTFILE
- now specifies the history save file. This file is opened and
- closed at every command, now on my system using the ICD disk
- cache I get such a negligable performance degradation that this
- seems quite reasonable. Let me know if it causes too many
- problems. The impetus for this level of file security is mgr,
- with multiple shells running I needed to close the file between
- writes, otherwise only the last shell run could access the
- history file. I couldn't get MiNT's file locking to do the job.
-
- Be warned, the history file will keep growing, it's up to you to
- trim it.
-
- HISTSIZE is not implemnted, yet.
-
- MINT_VERSION
-
- MINT_VERSION equals the version number of the currently running
- mint. Set to be readonly.
-
- UNIXPATH
-
- This variable is used internally to comunicate between levels
- of the shell, don't change it! thing's may break.
-
- TEMP
-
- All of ksh's temporary files ( mainly used for here
- document's ) use this directory. Otherwise the CWD is used.
-
- PPID
-
- Like in the real ksh PPID is now set to equal the process id
- of the parent process.
-
-
- 8) I've added some of the extra ksh variable formatting commands to
- typeset, ie.
-
- -l Lowercase variable
- -u Uppercase variable
- eg.
- 81 $ typeset -u name
- 82 $ name="Guy Gascoigne"
- 83 $ echo $name
- GUY GASCOIGNE
-
- -L Left justify var.
- -R right justify var.
- -Z right justify and pad with leading zeros.
-
- if one of these options is followed by a number, the number is
- interpreted as a field width. The next example left-justifies the value
- of the variable last in a field of 10 characters:
-
- 84 $ typeset -L10 last
- 85 $ last="Gascoigne-Piggford"
- 86 $ echo $last
- Gascoigne-
-
-
- 9) Ksh is now very MiNT specific, it exit's if MiNT isn't running.
-
-
-
- Please report any bugs to ggascoigne@cix.compulink.co.uk
- or if that bounces, to ggascoigne@compulink.co.uk
-
- Guy Gascoigne - Piggford
-
-