1
0

Source code upload

This commit is contained in:
calmsacibis995
2022-09-29 17:59:04 +03:00
parent 72fa9da3d7
commit 8fc8fa8089
33399 changed files with 11964078 additions and 0 deletions
+120
View File
@@ -0,0 +1,120 @@
KSH VS. SH
I have not made a complete comparison between 5.3 /bin/sh and ksh. A
direct comparison of the manuals may uncover more incompatibilities than
I have listed here. In addition, I have omitted some incompatibilities
that are bugs in 5.0 sh that may have been fixed for 5.3. I have
also omitted incompatibilities in cases that sh clearly is incorrect,
such as in cases where it core dumps. I have also omitted cases which
are bugs in ksh. I have omitted built-ins in ksh which are not in /bin/sh
since this can be circumvented by using the alias facility if necessary.
The following is a list of known incompatibilities between ksh and sh:
1. The IFS parameter is only effective for the read built-in and
after parameter and command substitution in ksh. Thus, IFS=x;
exit will execute e on the file it with sh but will exit with ksh.
2. If an environment parameter is modified by ksh, the new value
will be passed to the children. In sh you must export the
parameter for this to happen.
3. Time is a reserved word in ksh. Thus time a | b will time the
pipeline in ksh while only a will be timed with sh. You can
also time built-in commands and functions with ksh, you can't
with sh.
4. Select and function are reserved words in ksh.
5. Parameter assignments only have scope for the command or function
they precede in ksh. Only a subset of built-in commands in ksh treat
parameter assignments globally. In sh, all built-in commands and
functions treat parameter assignments as globals. (Notice that 5.0
and 5.2 treat parameter assignments to pwd and echo in an
incompatible way).
6. The output of some built-in commands and error messages is different
in a few cases, for example times produces two lines of output in ksh.
7. While loops with redirection are not executed in a separate process
in ksh so assignments made within loops remain in effect after the
loop completes.
8. The semantics of functions are somewhat different. Ksh can have
local variables and allow recursive functions. Errors in functions
abort the function but not the script that they are in. The parameter
$0 is the name of the function in ksh.
9. The name space for functions and variables is separate in ksh. In
/bin/sh they share the same space. The unset builtin requires
a -f flag to unset a function in ksh.
10. Words that begin with ~ may be expanded in ksh. Sh does not have
this feature.
11. The character ^ is not special in ksh. In sh it is an archaic
synonym for |.
12. Whenever a command is surrounded by (( and )), ksh assumes
that an arithmetic expression follows. In sh this means a
sub-shell inside a sub-shell.
13. Non-blank contiguous IFS delimiters generate a null input argument.
Therefore, you can use IFS=: and correctly read the /etc/passwd
file even when fields are omitted. In sh, multiple delimiters
count as a single delimiter.
14. Arithmetic test comparison operators (-eq, -lt, ...) allow any
arithmetic expressions. Sh allows only constants. If you say
test x -eq 0 in sh, which is meaningless, it returns true, but
in ksh it depends on the value of the variable x. If there
is no variable x, then ksh produces an error message.
15. The environment handed down to a program is not sorted in ksh.
A user should not reply in this quirk of sh since any user
program can provide an environment list which does not have
to be sorted. (Getenv(3) does not assume a sorted list).
16. There is an alias hash in ksh which does what the 5.2 has
built-in hash does except for the -r flag. In ksh, you must say
PATH=$PATH to achieve the same result.
17. The expansion of "$@" with no arguments produces the null string
in the Bourne shell and produces nothing with ksh when there are
no arguments. I am not sure whether this is a bug in the Bourne
shell or intentional. The manual page leads me to think that it
is a bug. Set -- with no arguments unsets the positional parameter
list in ksh. Thus, scripts that use set -- "$@" when there are
so positional parameters will not break.
18. Ksh accepts options of the form -x -v as well as -xv both for
invocation and for the set builtin. The Bourne shell only allows
one option parameter.
19. Ksh does not allow unbalanced quotes with any script. If the end of
file is reached before a balancing quote in sh, it quietly inserts
the balancing quote. Ksh, behaves like sh for eval statements.
20. Failures of any built-in command cause a script to abort in sh. Ksh
scripts will only abort on errors in certainly documented built-ins.
In this respect ksh treats most built-in commands semantically the
same as non-builtin commands.
21. The sequence $( is special in ksh. In sh the sequence is illegal
unless quoted. When used with "", $( must be preceded by a \ in
ksh to remove its special meaning.
22. The built-in command exec when used without arguments (for I/O
redirection), will close on exec each file unit greater than 2.
23. Ksh has some added security features which may cause some setuid
programs to stop working. Whenever the real and effective uid
of a shell program is different, ksh sets the -p mode which resets
the PATH and omits user profiles. The file /etc/suid_profile is
executed instead of the ENV file.
I am interested in expanding this list so please let me know if you
uncover any others.
+198
View File
@@ -0,0 +1,198 @@
As you've probably noticed, this Toolchest product has been delivered
in multiple directories: "src" with source code, and "fmt" and/or "unfmt"
for formatted or unformatted documentation. This file outlines the steps
needed to install the product on an AT&T 6386 computer running UNIX(R)
System V Release 3. Installation on other machines may differ and
is the responsibility of the installer to reconcile.
Product:
ksh-88d - The KornShell Command and Programming Language
Prerequisites:
This package requires no special UNIX system facilities.
To read before installing:
After unbundling, please scan the documentation and any
included README files. These will contain useful infor-
mation needed to build the product.
To make the source:
Unbundle any *.[0-9]b files in the directory in which the product
will be built. The following script could be used to expand
a bundle file:
cd src
for i in *.[0-9]b
do sh ./$i
done
Edit the makefile and change any references
to values that match your installation's needs.
Execute: (only one)
make -f ksh.mk -- generic make
make -- nmake build
makeshell -- build and install script
and wait a while.
To create the documentation:
The documents, if requested in nroff format, can be created
by issuing the following commands (troff if you prefer):
cd unfmt
mkdir ../fmt
nroff -mm sh.memo | col > ../fmt/sh.memo
nroff -man sh.1 | col > ../fmt/sh.1
nroff -mm PROMO | col > ../fmt/PROMO
File Sizes:
The following file size list is output from the command:
find src ! -type d -print | sort | while read FILE
do wc $FILE
done
and can be checked against the the files you received:
120 949 5380 src/COMPATIBILITY
151 679 4739 src/Makefile
36 139 867 src/Makescript
23 170 1109 src/OPTIONS
182 1536 9660 src/README
474 3388 19799 src/RELEASE
308 2706 16356 src/RELEASEa
75 283 2019 src/include/brkincr.h
218 699 5569 src/include/builtins.h
569 2002 15267 src/include/defs.h
176 767 5000 src/include/edit.h
31 110 763 src/include/flags.h
111 418 3103 src/include/history.h
273 926 6881 src/include/io.h
168 629 4207 src/include/jobs.h
260 1148 8346 src/include/name.h
65 219 1478 src/include/national.h
268 678 4890 src/include/shnodes.h
114 395 3172 src/include/shtype.h
76 246 2052 src/include/stak.h
109 341 2217 src/include/streval.h
93 297 2030 src/include/sym.h
173 621 4157 src/include/terminal.h
51 174 1280 src/include/test.h
23 90 590 src/include/timeout.h
31 91 618 src/install/bcopy.c
135 524 3870 src/install/compile
468 2172 14144 src/install/config
24 76 547 src/install/data.c
58 135 940 src/install/fastfork.c
34 116 752 src/install/fcntl.c
39 89 674 src/install/ftime.c
66 261 1668 src/install/gen_rdonly
52 108 825 src/install/getgroups.c
22 74 468 src/install/getppid.c
23 67 480 src/install/getrlimit.c
18 64 446 src/install/hz.c
15 54 385 src/install/int16.c
30 92 650 src/install/ioctl.c
47 106 795 src/install/ispipe.c
42 101 728 src/install/killpg.c
26 81 598 src/install/lock.c
26 92 608 src/install/lstat.c
34 104 640 src/install/nfile.c
47 125 872 src/install/opendir.c
27 79 567 src/install/path.c
67 148 1228 src/install/pgroup.c
31 81 604 src/install/poll.c
37 86 620 src/install/proto.c
38 106 789 src/install/rand.c
27 93 641 src/install/readonly
46 134 950 src/install/select.c
36 84 626 src/install/setjmp.c
22 74 488 src/install/setreuid.c
2 4 20 src/install/shellmagic
73 160 1387 src/install/sigrelse.c
52 113 850 src/install/sigrestart.c
33 95 686 src/install/socket.c
25 85 558 src/install/strchr.c
27 80 525 src/install/syscall.c
54 128 911 src/install/token.c
22 76 485 src/install/vlimit.c
26 70 459 src/install/void.c
30 88 588 src/install/wait3.c
26 78 511 src/install/waitpid.c
17 59 432 src/install/yellowp.c
36 139 867 src/ksh.bs
288 1045 9997 src/ksh.mk
36 161 1019 src/makelibedit
36 139 867 src/makeshell
250 621 5092 src/sh/apollo.c
658 1565 12333 src/sh/args.c
191 418 3499 src/sh/arith.c
2115 4646 38001 src/sh/builtin.c
1114 2577 20990 src/sh/cmd.c
228 1229 4898 src/sh/ctype.c
73 244 1631 src/sh/defs.c
107 252 1771 src/sh/echo.c
1418 3855 27630 src/sh/edit.c
260 605 4415 src/sh/editlib.c
1394 3544 26433 src/sh/emacs.c
183 439 3417 src/sh/error.c
557 1314 9751 src/sh/expand.c
349 769 6159 src/sh/fault.c
1170 3022 22009 src/sh/history.c
1207 2756 20726 src/sh/io.c
1221 2830 22698 src/sh/jobs.c
976 2115 16801 src/sh/macro.c
681 1716 13982 src/sh/main.c
820 2656 22007 src/sh/msg.c
1122 2572 22069 src/sh/name.c
352 836 5643 src/sh/print.c
1196 2952 23161 src/sh/service.c
407 1211 8875 src/sh/stak.c
338 834 5670 src/sh/string.c
502 1930 12487 src/sh/suid_exec.c
27 111 657 src/sh/syscall.s
493 1082 9236 src/sh/test.c
229 605 4655 src/sh/vfork.c
2604 7102 48636 src/sh/vi.c
571 1288 10698 src/sh/word.c
1015 2210 22104 src/sh/xec.c
138 377 2817 src/shlib/adjust.c
297 899 6447 src/shlib/assign.c
89 252 1825 src/shlib/assnum.c
140 400 2647 src/shlib/cannon.c
36 117 706 src/shlib/chkid.c
78 229 1454 src/shlib/convert.c
194 618 4505 src/shlib/findnod.c
61 212 1406 src/shlib/gettree.c
372 1056 7756 src/shlib/growaray.c
56 147 953 src/shlib/gsort.c
138 443 2993 src/shlib/linknod.c
139 446 2952 src/shlib/namscan.c
136 426 2648 src/shlib/optget.c
90 278 1745 src/shlib/rjust.c
77 314 2282 src/shlib/strdata.c
480 1088 7991 src/shlib/streval.c
366 1153 6506 src/shlib/strmatch.c
383 1103 7762 src/shlib/tilde.c
84 258 1755 src/shlib/unassign.c
161 484 3025 src/shlib/utos.c
114 382 2680 src/shlib/valup.c
44 214 1285 src/tests/alias.sh
48 133 848 src/tests/arith.sh
86 396 1993 src/tests/arrays.sh
73 290 1659 src/tests/attributes.sh
50 227 1336 src/tests/basic.sh
141 696 3506 src/tests/bracket.sh
32 150 897 src/tests/builtins.sh
64 175 1042 src/tests/coprocess.sh
74 237 1451 src/tests/functions.sh
93 347 2148 src/tests/grep.sh
68 363 1977 src/tests/quoting.sh
128 509 2500 src/tests/return.sh
55 174 1031 src/tests/select.sh
20 63 379 src/tests/shtests
71 224 1688 src/tests/substring.sh
57 186 1004 src/tests/tilde.sh
72 235 1327 src/tests/variables.sh
+23
View File
@@ -0,0 +1,23 @@
ACCT=0 # accounting
BRACEPAT=1 # C-shell {...,...} expansions (note , required)
ECHOPRINT=0 # make echo equivalent to print, overrides ECHO_N
ESH=1 # emacs edit option
ESHPLUS=1 # some additional emacs features
FLOAT=0 # floating point arithmetic
FS_3D=0 # 3d file system
IODELAY=0 # tries to delay for output to drain in edit modes
JOBS=1 # job notification job control if possible
LDYNAMIC=0 # dynamic loading for builtins, requires loader lib
MULTIBYTE=1 # multibyte character handling
NEWTEST=1 # new [[...]] compound command
OLDTERMIO=0 # for systems that must support both TCGETA and TCGETS
OLDTEST=1 # old test command as built-in
POSIX=1 # on for POSIX compatibility someday
P_UID=0 # real uid's that require -p flag for setuid/setgid
PDU=0 # Portable Distributed UNIX (Newcastle connection)
RAWONLY=0 # make viraw the only vi mode. Sometimes set automatically
RDS=0 # ~host!user expansions
SEVENBIT=0 # strip the eigth bit from characters
SUID_EXEC=1 # execute /etc/suid_exec for suid, sgid script
TIMEOUT=0 # number of seconds for shell timeout, 0 disables feature
VSH=1 # vi edit option
+128
View File
@@ -0,0 +1,128 @@
.SA 1
.sp 2
.ce
KSH-88 - The KornShell Command and Programming Language
.sp 2
.al
.P
KSH-88 is the most recent version of the KornShell Language
described in
"The KornShell Command and Programming Language,"
by Morris Bolsky and David Korn of AT&T Bell Laboratories.
The KornShell is a shell programming language,
which is upward compatible with "sh" (the Bourne Shell), with many added
features.
KSH-88 provides an enhanced programming environment in
addition to the major command-entry features of the BSD
shell "csh". With KSH-88, medium-sized programming tasks can be
performed at shell-level without a significant loss in performance.
In addition, "sh" scripts can be run on KSH-88 without modification.
.P
A number of enhancements and bug fixes have been made, many of which
were to enhance portability with certain compile options driven by
the characteristics of the target system.
Most of the code now conforms
to the IEEE POSIX 1003.1 standard and to the proposed ANSI-C standard.
Like the previous version, KSH-I,
it is designed to accept eight bit character sets
transparently, thereby making it internationally compatible.
It can support multi-byte characters sets with some characteristics
of the character set given at run time.
.P
KSH-88 provides the following features, which were also inherent in
KSH-I:
.BL
.LI
Enhanced Command Re-entry Capability: The KSH-88 history
function records commands entered at any shell level and stores
them, up to a user-specified limit, even after you log off.
This allows you to re-enter long commands with a few keystrokes
- even those commands you entered yesterday.
The history file allows for eight bit characters in
commands and supports essentially unlimited size histories.
.LI
In-line Editing: In "sh", the only way to fix mistyped
commands is to backspace or retype the line. KSH-88 allows you
to edit a command line using a choice of EMACS-TC or "vi"
functions.
You can use the in-line editors to complete filenames as
you type them.
You may also use this editing feature when entering
command lines from your history file.
.LI
Extended I/O Capabilities: KSH-88 provides several I/O
capabilities not available in "sh", including the ability to:
.BL
.LI
specify a file descriptor for input
.LI
start up and run co-processes
.LI
produce a prompt at the terminal before a read
.LI
easily format and interpret responses to a menu
.LI
echo lines exactly as output without escape processing
.LI
read and echo lines ending in "\e".
.LE
.LI
Improved performance: KSH-88 executes many scripts faster
than the System V Bourne shell. A major reason for this is
that many of the functions provided by "echo" and "expr" are
built-in.
.LI
Integer Arithmetic: A built-in command in KSH-88 allows you
to do integer arithmetic in any base from two to thirty-six.
Almost the complete set of C language operators are available.
Further, variables in arithmetic expressions may include
one-dimensional arrays. Arithmetic expressions can be used to
form arguments to commands.
.LI
Shell Functions and Aliases: Two mechanisms - functions and
aliases - can be used to assign a user-selected identifier to
an existing command or shell script.
Functions allow local variables and provide scoping
for exception handling.
Functions can be searched for and loaded on first reference the
way scripts are.
.LI
Substring Capabilities: KSH-88 allows you to create a
substring of any given string directly by stripping off leading
or trailing substrings during parameter substitution.
You can also specify attributes, such as upper and lower case,
field width, and justification to shell variables.
.LI
More pattern matching capabilities: KSH-88 allows you to specify
regular expressions for file and string matches.
.LI
Improved debugging: KSH-88 can generate line numbers on execution
traces. Also, I/O redirections are now traced.
There is a DEBUG trap that gets evaluated after each command
so that errors can be localized.
.LI
Job Control: On systems that support job control, including
System V Release 4, KSH-88
provides a job-control mechanism almost identical to that of
the BSD "csh", version 4.1.
This feature allows you
to stop and restart programs, and to move programs between the
foreground and the background.
.LI
Added security:
KSH-88 can execute scripts which do not have read permission
and scripts which have the setuid and/or setgid set when
invoked by name, rather than as an argument to the shell.
It is possible to log or control the execution of setuid and/or
setgid scripts.
The noclobber option prevents you from accidentally erasing
a file by redirecting to an existing file.
.LE
Documentation for KSH-88 consists of an "Introduction to KSH-88",
"Compatibility with the Bourne Shell" and a manual page and a
README file. In addition, the "KornShell Command and Programming
Language," book is available from Prentice Hall.
Product specs follow...
+182
View File
@@ -0,0 +1,182 @@
This directory, and its subdirectories contain the source code
for ksh-88; the language described in the book, "The KornShell
Command and Programming Language," by Morris Bolsky and David Korn
which is published by Prentice Hall. ksh-88 has build built on
run on several machines with several operating systems. The end
of this file contains a partial list of operating systems and
machines that ksh-88 has been known to run on.
Most of the source code for ksh is in the sh directory. Some
general purpose routines are in the shlib sub-directory. The
include files are in the include directory. The install directory
contains programs that determine the configuration of your machine to
generate the file include/sh_config.h. If you are cross compiling ksh,
you may have to generate this file on the target environment, or else
fill it in by hand. Also, if ksh will be compiled and linked with
another library, then this library should also be specified when
building the install script. The LIB variable in include/sh_config.h
is there for this purpose.
The OPTIONS file contains several options that can be set before
compiling ksh. The OPTIONS are set to their recommended value.
A value of 0 represents off, 1 represents on.
The options have the following defaults and meanings:
ACCT off Shell accounting.
LDYNAMIC off Dynamic loading of builtins. Not available yet.
ECHOPRINT off Make echo equivalent to print, overrides ECHO_N.
ESH on Compile with emacs command line editing. The original
emacs line editor code was provided by Mike Veach at IH.
ESHPLUS off Some additional emacs features provided by Matthijs Melchior
FLOAT off Floating point arithmetic. Not completely debugged.
FS_3D off For use with 3-D file system. The vpath and vmap calls
become built-in commands.
JOBS on Job notification, job control if possible.
IODELAY off Turning on will cause ksh to delay after writing long
lines to terminal in edit mode. This can improve
improve performance on slow terminal speeds on some
systems. It can cause overhead in some systems.
MULTIBYTE off Multibyte character handling.
NEWTEST on New [[...]] compound command.
OLDTERMIO off Use either termios or termio at runtime.
OLDTEST on Old test command as built-in.
POSIX off Enable some of the proposed changed for IEEE POSIX 1003.2.
P_UID off If set, all real uids, greater than or equal to this
value will require the -p flag to run suid/sgid scripts.
PDU off Portable Distributed UNIX. /.. is a 'super-root'.
RAWONLY off Turn on if the vi line mode doesn't work right unless
you do a set -o viraw.
RDS off Expand ~host!user. Requires distributed filesystem.
SEVENBIT off Strip the eigth bit from characters.
SUID_EXEC on Execute /etc/suid_exec for setuid, setgid script.
TIMEOUT off Set this to the number of seconds for timing out and
exiting the shell when you don't enter a command. If
non-zero, TMOUT can not be set larger than this value.
VSH on Compile with vi command line editing. The original vi
line editor code was provided by Pat Sullivan at CB.
The following compile options are set automatically by the install/config
script:
const Set to null string for compilers that do not support const.
void Set to int for compilers that do not support void type.
DEVFD Set when /dev/fd is a directory that names open files.
ECHO_N Set when /bin/echo -n does not echo at all. This causes the
echo builtin to handle echo like BSD echo when at run time
the shell would find echo in the /bin directory.
INT16 Set when size of an int is two bytes.
LSTAT Set for systems that have lstat() system call for symbolic links.
PDUBIN Set when PDU is on for systems the have /usr/pdu/bin/pwd program.
SHELLMAGIC
Set on systems that recognize script beginning with #! specially.
SIG_NORESTART
Set on systems where wait() and read() automatically restart
when they receive signals.
SOCKET Set on machines that contain the BSD socket calls. It causes
opens on path names of the form /dev/tcp/<inet>/<port> and
/dev/udp/<inet>/<port> to be treated as socket connection calls.
UNIVERSE
Set on systems that have the /bin/universe command. Causes
the universe command to be a built-in.
VFORK Set on systems where vfork() is much faster than fork().
This has not been fully debugged in this release.
VOID Set to int when the function argument to signal returns int.
VPIX Set on systems the have /usr/bin/vpix program for running MS-DOS.
YELLOWP Set on systems that have library function yp_get_default_domain().
To generate the binaries, type makeshell in the top level directory.
If you have 4th. generation make you can use it instead of makeshell. The
file ksh.mk is a standard makefile but may not work in some environments.
The install/config script is run first to generate include/sh_config.h.
This file defines all the compilation options. The binary for ksh becomes
the file named ./ksh which can be copied to where ever you install it.
It is advisable that you put the line PWD=$HOME;export PWD into the
/etc/profile file to reduce initialization time for ksh.
To be able to run setuid/setgid shell scripts, or scripts without read
permission, the SUID_EXEC compile option must be on, and ksh must be installed
in the /bin directory, the /usr/bin directory, or the /usr/lbin directory
and the name must end in sh. The program suid_exec must be installed in the
/etc directory, must be owned by root, and must be a suid program. If
you must install ksh in some other directory and want to be able to run
setuid/setgid and execute only scripts, then you will have to change the
source code file sh/suid_exec.c explicitly. If you do not have
ksh in one of these secure locations, /bin/sh will be invoked with
the -p options and will fail when you execute a setuid/setgid and/or
execute only script. Note, that ksh does not read the .profile
or $ENV file when it the real and effective user/group id's are not
equal.
ksh has been successfully installed as /bin/sh on several machines.
ksh does not use the archaic definition of ^ as a synonym for pipe.
On some early systems the scripts /usr/src/:mkcmd and /etc/shutdown
used the ^ as a synonym for | and must be changed if you install this
shell as /bin/sh. With Sun OS4.0, it is necessary to relink the shell
so that it doesn't use the shared libraries to that it can be used
for booting. Use the LDFLAGS=-Bstatic options when building ksh.
Unless ksh is compiled with the SEVENBIT option on, it passes 8-bit
characters transparently. As a result, programs that assume the
shell will strip off the 8th bit will fail. In particular, some versions
of the vi command put an 8th bit on the characters corresponding to % when
invoking a shell. The best solution is to fix the vi command. On the
source of vi the I have, you can make the following change to fix the
8-bit % problem:
line 77, the line reads:
*up++ = *fp++ | QUOTE;
Changing it to read:
*up++ = *fp++;
Otherwise, you can build a 7-bit ksh by turning SEVENBIT on in the
OPTIONS file.
The tests sub-directory contains a number of regression tests for ksh.
To run all these tests with the shell you just built, go to the tests
directory and run the command
SHELL=../ksh shtests
The file PROMO is an advertisement that extolls the virtues of ksh.
The file sh.1 contains the troff (man) description of this Shell.
The file sh.memo contains an old troff (mm) memo describing ksh. The
file RELEASE contains the changes made in this release since ksh-i(1986).
The file COMPATIBILITY contains a list of incompatibilities with the S5R3 sh.
The module sh/msg.c has a list of about twenty-five default aliases compiled
in. Alias values starting with / become tracked aliases.
A library of the code for the editing and history features can be generated
with the file makelib. This library can be added to most programs to enable
emacs or vi mode input. The library generated with makelib is called libedit.a.
Systems that do not have syscall() in libc require a routine named
rEAd() to perform the read system call. You can generate this routine
by extracting the read() system call from libc and editing the binary
changing read to rEAd and adding this module to the library.
Please report any problems or suggestions to:
David Korn
ulysses!dgk
Good luck!!
ksh88 has been compiled and beta tested on the following. An asterisk
signifies that ksh has been installed as /bin/sh on this machine.
* System V Release 2, 3, & 4 on AT&T 3B's.
* System V Release 2 on UNIX-PC.
* System V Release 3.[12] on AT&T 6386.
System V Release 2 on Vaxen.
System V Release 2 on Amdahl UTS.
* System V Release 3 on Counterpoint CP-19.
* BSD 4.3 on Vax 8650
* BSD 4.3 on CCI.
Version 9 on Vax 785.
* Sun 3.5 on Sun 3's.
* Sun 4.0 on Sun 3's and Sun 4's.
Sun 4.0 on Sun 386-i.
Unicos on Cray-2.
UNIX on Masscomp 5400 in ucb universe.
HP/UX 2.0 on HP-9000.
Ultrix 2.0 on Microvax.
Domain/IX on Apollo 3000.
Custonmuix 4.1 on Alliant.
UIMPS 3.1 on a MIPS 120-5
5.0 on a Pyramid in ucb universe.
+474
View File
@@ -0,0 +1,474 @@
This is a list of changes that have been made since the 06/03/86 version
of ksh.
1. New features in 11/16/88
a. Additional pattern matching capabilities have been added.
A pattern-list is one or more patterns separated by |.
The following can now be all or part of a pattern:
1. ?(pattern-list) - allows any pattern to be optional
2. *(pattern-list) - matches zero or more of any pattern
3. +(pattern-list) - matches one or more of any pattern
4. @(pattern-list) - matches one of any pattern. The @
is optional for nested patterns.
5. !(pattern-list) - matches everything, except any of the
patterns.
b. A new compound command beginning with the new reserved
word [[ and ending with the new reserved word ]] has been
added. This compound command is intended to replace both
test and [. The operators && and || replace -a and -o.
Unquoted parenthesis are used for grouping. The words
between [[ and ]] are not expanded for word splitting
and pathname expansion. The operators = and != allow the
right hand side to be a pattern. You can also specify
< and > within [[ ]] to compare two strings. Also the
following test primitives have been added to test, [ and [[:
1. -O file, returns true if file is owned by effective user.
2. -G file, returns true if file is owned by effective group.
3. -S file, returns true if file is of type socket.
4. -a file, returns true if file exists.
5. -o option, returns true if option is on.
6. Extra arguments are no longer result in an error.
This increases compatibility with the Bourne shell.
7. File names of the form /dev/fd/NN can be used to check
the attributes for file descriptor NN.
c. The operators &&, ||, &, |, ^, <<, >> and ~ have been added
the the arithmetic evaluator. You can use them in any
arithmetic expression. Also, all the assignments operators,
+=, etc. are now recognized by ksh. The precedences and
associativity of ksh arithmetic operators are the same as
those of the C programming language.
d. Several options have been added or changed.
1. A noclobber option has been added. With noclobber
set, > file produces an error when file exists.
Use >| file to write to file even if noclobber is set.
2. A nolog option has been added. Nolog disables
the saving of the source for functions in the
history file.
3. bgnice is now turned on by default when interactive.
4. The meaning of the -p option has been changed
as well as its name. In the previous version,
-p caused the path to be reset to a default value
and the shell not to run your personal .profile
and $ENV file. Instead, the shell executed a file
named /etc/suid_exec. The -p option was enabled
automatically whenever the real and effective user
or group id were not equal. This was called the
protective option. With the new release, the -p
no longer resets the path to a default value. In
addition, the effective user id and group id are set
to the real user id and group id unless the shell
has been invoked with the -p options which is now
called privileged. In addition, turning off
privileged, (set +p) sets the effective ids to
their real values. On some systems you the command
set -p will restore the permissions to the way that
they were before the set +p.
e. Six new variables have been added.
ERRNO - set to the value of errno after each system call.
LINENO - set to the line number of current command.
PS4 - evaluates to prompt used with set -x, default '+ '.
FPATH - used to search for function definitions. The FPATH
directories are searched after the PATH variable.
If a file is found, it is dotted into the environment
and then it tries to execute a function of the
given name. The declaration typeset -fu name, causes
name to be searched for in FPATH directories before
searching PATH. A preset alias, autoload='typeset -fu',
has been added.
OPTARG - used with the getopts built-in.
OPTIND - used with the getopts built-in.
f. The following changes and additions have been made to the
editing modes:
1. Searches starting with a ^ now only match at the
beginning of the line in both emacs and vi mode.
2. Searches are performed much faster than with
earlier versions.
3. The | directive has been added to vi
4. The r directive of vi can now be preceded by a count.
5. The new vi directive \ causes the current word to
be extended as far as possible as long as it matches
a unique pathname.
6. Emacs <ESC><ESC> now behaves like vi \ above.
7. Undefined <ESC> sequences in emacs now beep.
8. Emacs keeps prompt on screen when scrolling.
9. Last delete saved across commands in emacs.
10. M-^]c, moves back to character c.
g. A DEBUG trap has been added to aid debugging. This trap
gets executed after each statement. Also, set -x now
displays I/O redirections.
h. You can now assign an array with set -A array_name value...
i. Aliases will now be expanded inside other alias. Thus, if
alias foo=bar bar=bam then foo will expand to bam. However,
an alias will not re-expand within its own expansion so you
can alias ls='ls -C'. If you alias foo=bar bar=foo, then
foo will expand to foo and bar will expand to bar.
j. The commands typeset and alias now allow option arguments
as separate words, rather than all in one word. For example,
typeset -ux and typeset -u -x. Also commands that allow
multiple options, now allow you to specify -- as an
indicator that there are not more options. This is needed
in case the next argument starts with a -.
k. The attributes for exported variables are now passed through
then environment. Thus setting a variable readonly and
exporting it will cause it to be readonly whenever a shell
is invoked. The IFS parameter is reset to the default value
even if you export it, after reading the environment file.
l. If the last element of a pipeline is a built-in, a compound
command or a function, then it is now executed in the current
process environment. If you require the previous semantics
then you must use parenthesis. All the other elements
of a pipeline are carried out in a separate environment and
any changes are not brought back to the parent environment.
This remains a caveat and you should use parenthesis if you
require that they be carried out in a separate environment.
m. The ~ expansion now uses yellow pages on systems that
provide this network service.
n. The expansions for ~, ~+ and ~- have been changed to expand
to $HOME, $PWD and $OLDPWD respectively. Previously, they
returned the value of the home directory, the present working
directory and the previous working directory at the time
they were read. This caused surprising results when used
within scripts or functions.
o. The getopts built-in from System V release 3 has been added.
p. You can now move the file descriptors for a cooperating
process (a job followed by |&), to numbered files by using
exec n<&p for the read descriptor and exec n>&p for the
write descriptor, where n is a digit. Once you move this
descriptor you can close it or redirect any command to or
from it.
q. The built-in commands break, continue, and exit now behave
like special built-ins and have a dagger in front of them
on the man page.
r. Each pattern in a case statement will now allow an optional
open parenthesis. The open parenthesis is required when
a case statement is part of a $() command substitution.
s. The previously unadvertised <> redirection operator, now
works. This operator causes a file to be opened for read
and write. The file is not truncated.
t. The alert character sequence \a has been added as an
escape sequence to the echo and print built-in commands.
The sequence \a will expand to the ASCII Bell character.
u. When ksh reads an unquoted ${, it now reads until the
matching unquoted } as part of the same word. Thus,
you do not need to use quotes to put most blanks and
most other special characters inside ${...}.
v. Code for BSD style job control for System V is now
conditionally compiled with the SIGTSTP signal. These
should work with any POSIX conforming job control
implementation such as System V Release 4. Also, can now
refer to jobs as %?string to match a job that contains
string as part of its name.
w. A trap on CHLD will be executed when a child process
stops or exits. Thus, with monitor mode on, you can set
trap 'jobs -n' CHLD to get the csh, set notify behavior.
x. The -p option has been added to whence to find the pathname
of a given name, even when the name is an alias or function
name.
y. Options -L and -P have been added to pwd and cd on systems
with symbolic links. The default, -L, preserves logical
naming so that .. will move up one component towards the
root. The physical option, -P, uses a physical model for
paths. Thus, if /usr/include/sys > /sys/h, then cd
/usr/include/sys;pwd;pwd -P, will print /usr/include/sys
followed by /sys/h. A cd .. will put you in /usr/include,
whereas a cd -P .. will put you in /sys.
z. $((expression)) expands to the value of the enclosed
arithmetic expression.
aa. The argument to umask can also be a symbolic string in
the format of a chmod permission string.
3. Bugs fixed since 06/03/86
a. typeset -LZ2 x, followed by integer x, created a base 2
integer variable x. This now correctly makes x base 10.
b. Single quoted strings with adjacent characters $( sometimes
did not work correctly. This has been fixed.
c. The suid_exec program now works correctly for setuid scripts.
The fix in the 06/03/86a release solved the security problem
but caused setuid scripts with read permission to fail.
d. A bug in the MULTIBYTE version which could cause core dumps
on variable assignments has been fixed.
e. The following parameter expansion bugs have been fixed:
1. Expansions of the form ${x-'${...}'} incorrectly
evaluated to ${x}} when x was set.
2. Expansions of the form ${x+$} and ${x+$\}} displayed
the message 'bad substitution' when x is not set.
3. The expansion "${x:=a b}" now expands to a single
argument when x is not defined. It previously
expanded to two arguments.
f. Non-builtin command incorrectly had backslashes removed
from the command before execution. Thus '\date' would execute
the date command. This has been fixed.
g. On some versions of Unix the shell did not die when sent
a hangup signal while in an editing mode. This has been
fixed.
h. Some fixes have been made to the the emacs edit directives.
1. M-< now works as documented.
2. ^N now works correctly after ^P reaches the oldest
command from the history file.
3. ^W now works no matter what your backspace character.
4. Scrolling now works correctly when you prompt is longer
than half the width of your screen.
5. Pathname completion no longer causes a core dump on
system that don't allow references to 0 when you expand
a word that expands to a null string, i.e. $foo.
6. M- before a newline or return no longer has an effect.
i. Some fixes have been made to the the vi edit directives.
1. Lines of one character in length now work.
2. The . directive now works correctly after the R directive.
3. The ~ directive now works correctly when preceded by a count.
4. The directives c0, d0, cb and db now work.
5. You can now use ESC to cancel r, f and @ directives.
6. On System V, if you have ignoreeof set, and you enter
EOF, you no longer receive 'use exit to logout' messages
when you subsequently hit ESC.
7. Tabs now get expanded to correct columns when ksh
redraws the line.
8. The e and E directives now ring bell when there are
no characters on the line.
j. Syntax errors in the ENV file now correctly list the name
of the ENV file as part of the message.
k. The let command when invoked as ((expr)) was fixed to work
correctly when expr contained $() or ``. Also subscripts
in variable assignments now work correctly when they contain
$() and/or ``.
l. The if..then..elif..fi now correctly handles redirection.
Previously redirection applied only to the elif portion.
m. A script containing lines like exec 3<file;read line <&3
read line <&3 didn't work correctly because of buffering
problems. This has been fixed.
n. On machines that do not allow referencing address 0, a
null command substitution `` or $() cased a core dump.
This has been fixed.
o. If you declared an integer variable and gave it a null string
as an assignment, then the value was randomly set. It is now
set to zero, i. e., integer x;x=.
p. If you have and alias to a single word command, and you use
the r predefined alias to reexecute it, you will no longer
get an extra newline displayed. An alias ending in space
no longer has an extra space displayed.
q. An alias of the form x='foo > file' incorrectly attempted alias
substitution on the first argument of x. This has been fixed.
Also, aliases and commands of the form, > foo x=bar command
are now correctly handled.
r. The parameter $! now gets set for cooperating processes.
s. Under some circumstances a write to an co-process did not
flush so that a subsequent read caused the process to hang.
This has been fixed.
t. When you invoke a shell procedure containing a here document
from within a command substitution contained in double
quotes, ( "`shell_prog`"), parameter substitutions inside
the here document no longer insert extra \'s.
u. A bug in line continuation caused lines ending in \x\ not to
be continued properly has been fixed.
v. The whence built-in command returned the wrong value when you
specified a full pathname and there was a tracked alias with
the same simple name. This has been fixed. Also whence no
always returns an absolute pathname for programs.
w. You can now specify typeset -fx before a function is defined
to set the x attribute. Before, defining a function cleared
the x and t attributes.
x. A trap on EXIT from within a function no longer affects the
return value of a function.
y. set -e and trap on ERR didn't get triggered in some cases where
it should have. This has been fixed.
z. A bug that caused the shell to hang when the shell timed out
and you had a trap on EXIT that did a command substitution has
been fixed.
aa. On some systems kill -l could cause a core dump. This has
been fixed.
bb. The ignoreeof option only applies when reading from a tty.
This prevents ksh from looping when running sh -i when reading
from a pipe or a file.
cc. case patterns of the form identifier[ are now processed
correctly.
dd. On some 16-bit machines $$ and $RANDOM were not getting set
correctly. This has been fixed.
ee. A space or tab at the end of a command is now placed in the
history file when preceded by a \ at the end of a command.
ff. ksh can now handle a signal that ksh does not know about.
This can happen when a signal ha been added after ksh was
compiled. It will print the signal number. On previous
versions the results were undefined and could even cause
core dumps.
gg. In instances where there are unbalanced quotes and ksh
allows unbalanced quotes, the results are now the same
as bsh. In some cases the last character was lost. For
example, x=`:|echo 'abc/` no longer removed the /.
hh. sh -n no longer loops indefinitely when you have
while looks in your script. Also, -n will make more
extensive syntax checks than earlier versions.
ii. A bug in read that caused the last field not to get
set to null when there were trailing delimiters has
been fixed.
jj. break 0 no longer puts you in a noexecute mode when entered
interactively.
kk. ksh no longer dumps core when expanding some long
substring patterns.
ll. A bug that caused exec not to find a program when
a PATH contained relative directory that contained it
has been fixed.
mm. Setting IFS to a null string, now correctly keeps ksh
from splitting up arguments after parameter and command
substitution.
nn. Unsetting PS1 no longer causes the shell to core dump
on systems that cannot access address 0.
oo. If a child process terminates with O_NDELAY (or FNDELAY
or O_NONBLOCK) set on the terminal, this no longer causes
the shell to exit.
pp. If you refer to a job using a prefix which is ambiguous,
a message is displayed. Previously, the prefix matched
the most recent job starting with this prefix.
qq. ksh now produces syntax errors when the last element
of a pipeline is omitted, for example a | &.
rr. Here-documents containing expansions of the form ${x-y},
or other operators, now work correctly when y contains
double quotes and/or backslashs. Double quotes are
not treated specially inside a here-document and a \
is only special when followed by a $, `, and \. This
was a bug in the Bourne shell also.
ss. The read built-in now treats \ as an escape character
when reading input if you do not specify -r. This is
the same as with the Bourne shell.
tt. sh -t now works that same as with the Bourne shell.
uu. "${x[*]}" now always expands to a single argument.
vv. If you do not specify a size with typeset -R, -L,
or -Z, the size gets defined on the first assignment.
ww. When set -k is on, words in a for list of the form
name=value are no longer discarded.
xx. A dot script that dots itself recursively, no longer
produces a core dump. It now prints an error message.
yy. ksh script requires execute permission for script
when using PATH to find script.
zz. The exit status of all commands is now limited to
between 0 and 255. Previously, builtin commands
could have other return values.
aaa. If the ENV file contained functions that used here
documents, then "sh -c prog" no longer leaves temporary
files around.
bbb. (trap 'echo foobar' 0; date) now executes the exit
trap. With Bourne shell and earlier ksh it didn't.
ccc. The shell no longer aborts when the history file grows
larger than ulimit.
ddd. An expansion of the form ${name%/\*} no removes only
a trailing /*. Previously in removed / followed by
anything.
4. The source code has undergone significant modification.
a. The SXT conditional compilation has been removed and all
the code in the jsh directory has been stripped out.
b. Most configuration parameters now get generated rather
than relying on testing which system you are on. This
should make it easier to port to hybrid systems. Other
options are now set in the OPTIONS file.
c. The are several new compile time options. See the README
file for details.
d. There is no more standard makefiles with this distribution.
The build procedure is written in native V7 Bourne shell.
There is also a 4th. generation make (nmake) Makefile
for those lucky enough to have this tool.
e. There are far fewer global names. This should make it
must easier to add built-in commands without worrying
about conflicts.
f. The code no longer uses standard I/O. This should make
it easier to port.
g. There are ANSI C prototypes for most of the external routines
h. Several minor performance enhancements should make startup
faster and should make some scripts run faster.
5. Incompatibilities with 06/03/86 version.
a. name=value ... is now evaluated left to right in accordance
with POSIX.
b. Aliases and functions defined in the $ENV file without -x
are removed before running a script.
+308
View File
@@ -0,0 +1,308 @@
This is a list of changes that have been made since the 11/16/88 version
of ksh.
1. New features in 11/16/88[abcde]
a. All characters of alias names can contain non-special
characters, not just the first. A / is not a valid alias
character.
b. The vi % directive has been added to 11/16/88c
c. A new [[...]] -C option returns true for contiguous files.
This option returns false on systems that do not support
contiguous files.
d. Setting REPLY to the null string in a select command causes
the selection list to get refreshed in 11/16/88d.
e. Unary minus added for arithmetic expressions to increase
compatibility with system V test command.
f. Starting with 11/16/88e, The vi directive '#' has been changed
so that each line of the command is turned into a comment.
Also, if the first character of the command is a '#', the '#'
in front of each line is deleted.
g. The message for EOF with ignoreeof has changed in 11/16/88e.
h. A SOCKETS option has been added for machines with the BSD
socket calls so that scripts can connect to sockets via
redirection. See the README file for more details.
i. Starting with 11/16/88e, the behavior of 'ksh script' where
script is not a shell script has been changed. If ksh detects
that script is an a.out, a cannot exec error message is generated.
2. Bugs fixed in 11/16/88a for default OPTIONS
a. Files containing a \ were not matched correctly with patterns.
b. read without arguments no longer references location 0.
c. The value of integer exported variables was not inherited
correctly in some cases.
d. The characters ()|&\ in IFS did cause word splitting when ksh
expanded commands.
e. $! expanded to 0 before any background jobs were run, rather
than to the null string. The value of $! was not reset to
null when running a script by name.
f. On some machines, the shell would core dump if the variable
LINENO was exported.
g. The [[ ]] command did not handle multiple && and || without
parenthesis grouping.
h. On some BSD implementations, terminal setting were being
incorrectly reset when using vi-mode.
i. The execution of traps that write to standard output got
lost when the trap occurred while executing command substitution
of a built-in command.
j. The noclobber option now only applies to ordinary files.
k. The value of RANDOM changes when ksh creates a subshell.
l. Some syntax error messages had extra backslashes in them.
m. The expansion ${#name[number]} was not returning the string
length of array element number.
n. ksh did not work correctly in some cases when there was
no search permission in the current directory.
o. A pipeline would hang if the last element of the pipeline
was a shell construct that created a lot of child processes.
For example, cat file | while read line;do /bin/true;done
p. getopts has been fixed to agree with the description in
the man page. Previous ksh initialized OPTIND to 0, not 1,
and did not handle the case with a leading : as described.
q. If the name of the directory you are in contained a :,
a cd command to a relative pathname did always work correctly.
r. read -s now saves commands in the history file even when
read has been redirected from a file.
s. Some here documents containing command substitution with
a command that read from standard input didn't work
correctly.
t. (exec >&-; echo $(command) >&2) no longer runs command
with file descriptor 1 closed.
u. The <ESC>* command of vi and emacs inserted an extra
space when exactly one file matched.
v. A bug in vi edit mode caused a 'p' command to fail
after a 'D' command on some machines.
w. Reseeding the random number generator now guarantees
the same random sequence.
x. The results command substitution with built-in commands
that produced over 1K of output was sometimes incorrect.
y. set -A, without an argument, now produces an error message.
set -A name ... no longer causes the positional parameters
to be reset as an unintentional side effect.
z. Unterminated here-documents do not generate syntax errors
unless the -n option is on.
aa. Job control now works for functions as it did with ksh-i.
bb. The exit status of a pipeline whose last element is a built-in
command is now correct.
cc. ksh no longer dumps core when the last element of a pipeline
is a built-in command with an invalid parameter expansion.
dd. A trap on CHLD is no longer triggered by processes in the
current pipeline.
ee. One systems without readdir(), filename generation left
open files by mistake.
ff. traps ignored in a shell script were sometimes reset to
caught when functions were invoked.
gg. The trace (set -x ) of [[ x < y ]] and [[ x > y]] was incorrect.
hh. foobar() ; no longer core dumps.
ii. A trap on continue from within a select loop no correctly
when the trap occurs while reading from the terminal.
jj. The r command correctly handles numerical replacements so
that r 3=4 now works.
kk. Long lines (>3K) no longer causes a core dump with read.
ll. The command substitution $(name=value) no longer causes a
core dump.
mm. With the vi edit mode on some systems, extra characters were
left on the screen when the kill or erase characters were
preceded by a backslash.
nn. After a dot script that couldn't be found, a trap command
in a script could cause a core dump.
oo. Redirection with read of the form, read x <&3, was causing
the seek position on unit 3 to be positioned incorrectly.
pp. When an invalid alias name is given, ksh now prints the
correct error message.
qq. On systems with job control, if you escaped to a shell that
terminated abnormally, the calling process would hang.
3. Bugs fixed in 11/16/88b for default OPTIONS
a. ${x-"{a}"b} now expands to {a}b when x is not set.
b. ksh no longer core dumps with print -s when HISTFILE changed.
c. Tab stripping of numbered here-documents now works.
d. The deprecated, sh -t, now works the same as System V shell.
e. Attempting to list autoloaded functions no longer core dumps.
4. Bugs fixed in 11/16/88c for default OPTIONS
a. The process id for background jobs killed from scripts was
incorrect.
b. The wait built-in did not always return the correct value when
there was more than one background job.
c. ksh dumped core while in read with stderr redirected and in
emacs mode when it received an signal that had a trap set.
5. Bugs fixed in 11/16/88d for default OPTIONS
a. With the monitor option on with systems without job control,
login shells no longer print an extraneous 'running jobs'
message with a|b, where b is not found.
b. On systems where the behavior of the echo builtin depends
on the location of echo in the PATH variable, ksh no longer
core dumps if the PATH does not have a directory containing
an echo command.
c. return with an argument greater than 256 no longer causes
a core dump.
d. Tests on files whose names are null return false on all systems.
e. In some instances $0 was being incorrectly set after the
dot command was invoked with arguments inside a script.
f. The line number enclosed in [] when ksh reports a syntax error
has been corrected to be the first line of the command that
it is reading.
g. A trap on EXIT after a syntax error sometimes inserted an
extra character before the trap command text.
h. for i in ...; do echo ${i[@]};done no longer causes a subscript
error.
i. If the read built-in was interrupted, the terminal was not
always restored to the state it was in before read.
j. Output from background status changes with the monitor mode are
now written to standard error.
k. Executing a function interactively no longer causes SIGTERM
to be caught.
l. Using _ as an array variable no longer causes a core dump.
m. Unsetting a function more than once no longer causes core
dumps or other undesired side effects.
n. The code to process the substring operator ## was changed
so that the time was no longer quadratic in the length
of the string.
o. A bug that caused a job to disappear from the jobs table
after sending it a CONT signal has been fixed.
p. On systems where a null pathname is not the same as .,
the command 'cd .' would fail if the environment was cleared
before executing ksh.
q. In vi-mode, the screen did not always get refreshed correctly
when an insert followed a delete in front of a control character.
r. A bug in getopts that could cause a core dump when getopts
was called with fewer arguments on subsequent calls was fixed.
s. In vi-mode, ^V^M now enters ^M, not ^J on most systems.
t. On systems with job control, the kill command now sends out
SIGCONT signal after the signal has been sent, not before.
u. If the shell was interrupted while processing the .profile
file, the $ENV file was sometimes echoed to the terminal.
6. Bugs fixed in 11/16/88e for default OPTIONS
a. The code for item n from the d point release was omitted
but included in this release.
b. A script that uses edit modes now restores the terminal
modes with it receive a termination signal. Also, the
initial process group is restored for job control shells.
c. The standard input for background jobs was not set to
/dev/null in some cases where it should have been.
d. The value of $? now gets set correctly to indicate an
error after eval fails because of a syntax error.
e. The line discipline ^O bit is now cleared by ksh on some
systems that use sys/termios.h. Earlier versions only cleared
the ^O bit for BSD systems.
f. The suid_exec program has been modified to fix security
problems that could arise on systems that have symbolic links
but do not have the seteuid() system call.
g. The precedence for compound arithmetic assignment operators
such as *= was incorrectly set at the precedence of the
operator rather than the precedence for assignment.
h. The suspend character is now disabled when the last process of
a pipeline is not stoppable to prevent deadlock.
i. An extra secondary prompt was printed whenever a here-document
line contained a partial delimiter.
j. The EXIT trap will be executed for each function in the calling
chain when exit is called and when the maximum recursion level
(currently 128) is reached. Also return now behaves the same
as exit outside a function or a dot script and inside a subshell.
k. The value of $? no longer changes with a compound [[...]] command.
l. The jobs command now correctly reports 'no such job' when you
specify a pid that is not part of any running job.
m. The legal names for restricted shells have been reduced to
rsh, krsh, and rksh.
n. The vi, r, f, and @ directives now process ^V correctly. Also,
the r directive updates the screen correctly after you back
up to a control character and replace it with a non control char.
o. The command, $x > file, where x is not set, no longer core dumps.
p. When the read is redirected from a file it no longer issues the
secondary prompt when the line is continued with a \.
q. Variables that have attributes, but whose values are unset,
are now displayed with typeset, export, and readonly.
s. Set, without arguments, now displays the name-value pairs even
when preceded with a variable assignment list.
t. set -a now causes assignments of the form ${x=value} to get
the export attribute.
u. Arithmetic expansion, $((...)), inside here-documents no longer
causes subsequent parameter expansions to have extra \ inserted.
v. A bug that could cause the shell to go into an infinite
loop while creating the history has been fixed.
w. true and false are now built-in commands rather than aliases so
that correct results are produced when invoked with extraneous
arguments.
x. A tab character near the end of a long prompt no longer
causes the shell to hang.
y. An expansion of the form $((...)) is processed as an arithmetic
expansion only when the inner parenthesis match. Otherwise,
it will be processed as a nested command substitution.
z. Unsetting a function no longer causes the whence builtin to
give incorrect results for that name.
aa. Errors detected while expanding the PS1 prompt no longer
leave the shell in an undefined state.
bb. A bug that caused the shell to hang in read when a
coprocess (cmd |&) terminated has been fixed.
cc. A bug in getopts that caused a core dump when standard error
was redirected has been fixed.
dd. Testing for file access with null file names now returns false
now on all systems.
ee. A bug with [[...]] that caused quoting of patterns following the
= and != operators to give incorrect results has been fixed.
ff. A bug with nested $() of builtins, where inner $() was enclosed
in double quotes has been fixed.
gg. A bug that caused incorrect results when the -x trace option
was enabled and command substitution of a builtin command
produced no output was fixed.
hh. A bug that prevented set -e from exiting with pipelines has
been fixed.
ii. Interactive shells that trap TERM, and then reset the trap,
no longer exit when they receive a TERM signal.
jj. When inserting text in vi mode, the kill character deletes
only the insertion, not the whole line.
kk. A bug with eval that occurred when a word ended in a \ has
been fixed.
ll. typeset -f fname now returns false after function fname
has been unset.
mm. A bug in trap that caused a command to be interpreted as a
trap number if the first character was a digit has been fixed.
nn. A bug that caused a trap action of return to not work correctly
when an interrupt occured during read has been fixed.
oo. A bug that could cause the exported value of an integer variable
that has been imported and modified to be incorrect has been fixed.
pp. A bug that caused set -n to incorrectly report subscript errors
has been fixed.
qq. The select list variable is now set to null when none of the
given choices is not selected. Previously it was unset.
rr. The pattern */foo, now also matches symbolic links to non-existent
files.
ss. The whence command no longer terminates when it doesn't find
one of the names.
7. Bug fixes for specific non-default option combinations.
a. VERSIONS: MULTIBYTE no longer automatically enabled.
b. ACCT: The accdefs.h include removed.
c. BRACEPAT: No longer references location 0 and dumps core.
d. EMACSPLUS: Now enables additional EMACS features.
e. FLOAT: arith.c now compiles.
f. VI off: e_runvi is no longer unsatisfied external.
g. SUID_EXEC: execute only works when file descriptor 10 is open.
8. Other changes to 11/16/88[abcde]
a. sh.1 corrections.
b. sh.memo corrections.
c. ksh.mk modified to build in a cross development environment.
d. jobs.c modified to compile on machines that define the new
line discipline, NTTYDISC, but not the old, OTTYDISC.
e. RELEASE file corrections.
f. Some fixes to the stand-alone edit libraries.
g. VERSIONS option renamed FS_3D
h. POSIX option added to try out some IEEE POSIX 1003.2 proposals.
i. VFORK bugs fixed. I still don't recommend this option.
j. OLDTERMIO option added to 11/16/88c. This option allows older
termio ioctls, like TCGETA to be called after newer termios
ioctls' fail. Only effective for machines that have both termio.h
and termios.h.
k. universe builtin added to 11/16/88d for systems with /bin/universe.
l. code changes to 11/16/88e to remove sbrk() dependence and to
use the standard library version of malloc().
m. A tests directory that contains some ksh regression test has
been added. See the README file for more details.
n. The way builtin commands are coded has been changed to make
it easier to add builtins.
9. Incompatibilities with 11/16/88 version.
None intentional.
File diff suppressed because it is too large Load Diff