diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-06 17:18:43 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-06 17:18:43 +0000 |
commit | c9194fdb38c8dfe9d4667ec3347c10dba2c1f8c4 (patch) | |
tree | b7b6e1ce12e08eeb6f80e138126262c38c1d1b11 /bin | |
parent | ece7d1243847a8a452660af8c2605eebdbf23e11 (diff) |
Remove a 250-line catalog of AT&T ksh bugs. ok tedu
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/NOTES | 251 |
1 files changed, 1 insertions, 250 deletions
diff --git a/bin/ksh/NOTES b/bin/ksh/NOTES index 2de45c77541..4cb0a129168 100644 --- a/bin/ksh/NOTES +++ b/bin/ksh/NOTES @@ -1,4 +1,4 @@ -$OpenBSD: NOTES,v 1.12 2013/11/28 10:33:37 sobrado Exp $ +$OpenBSD: NOTES,v 1.13 2015/12/06 17:18:42 mmcc Exp $ General features of at&t ksh88 that are not (yet) in pdksh: - exported aliases and functions (not in ksh93). @@ -244,255 +244,6 @@ Oddities in ksh (pd & at&t): - undocumented at&t ksh feature: FPATH is searched after PATH if no executable is found, even if typeset -uf wasn't used. -at&t ksh bugs: - [various versions: - MIPS m120 RISC/os 5.0: Version 11/16/88d - Dec alpha osf/1 v1.3: OSF/1 Version 11/16/88d NLS - HP pa HP-UX 9.01: Version 11/16/88 - ] - - (only hpux) - $ _[2]=hi - Bus error (core dumped) - - (only riscos, hpux) - $ typeset x[ - $ - - (only osf/1) - $ A=B cat << EOF - .$A. - EOF - Segmentation fault(coredump) - $ - - (only osf/1) - $ read "?foo " - foo Foo - $ set | grep Foo - =Foo - $ - - (all) - $ typeset -i A - $ typeset -L3 A - $ typeset -l A - Illegal instruction (core dumped) - - (all) - $ for i in a b c ; do echo $i, ${i[2]}, ${i[10]} ; done - a, , - a, , b - a, , c - $ - - (all) - $ echo ${abc:-G { I } K } - G { I K } - $ - $ abc=hi - $ echo ${abc:-G { I } K } - hi K } - $ - The second echo should only have printed `hi'. - - (all) - $ echo ${abc:- > foo} - syntax error: > unexpected - $ - - (all? hpux) read reads too much from pipe (when pipe isn't stdin) - print 'hi\nthere' | ksh 8<&0 0< /dev/tty - $ read -u8 x - $ print $x - hi - $ cat 0<&8 - $ read -u8 y - $ print $y - there - $ - - (all) - $ umask 0 - $ umask - 00 - $ - - (osf, mips, !hpux) - $ exec alias - alias: not found - (shell dead) - - (all) non-white space IFS in non-substitution not preserved - $ IFS="$IFS:" - $ echo : "$@" # this is ok - : - $ echo :"$@" # this should print : too (me thinks) - - $ - - (only osf/1) - $ set +m - $ sleep 1 & # wait for a sec or two - $ jobs - Memory fault (core dumped) - - (all) - $ (sleep 1 & echo hi) & - [1] 123 - $ [1] 234 - hi - - (osf/1, mips) - $ getopts abc optc -a -b -c - $ getopts abc optc -a -b -c - $ getopts abc optc -a - Memory fault (core dumped) - - (osf/1) POSIX says OPTIND shall be initialized to 1 - $ echo $OPTIND - 0 - $ - - (osf/1 + others?) - $ typeset -ri r=10 - $ let r=12 - $ echo $r - 12 - $ - - (osf/1 + others?) - $ typeset -i a - $ typeset -L3 a - Memory fault (core dumped) - - (osf/1 + others?): -L strips leading \ \t\n\r, -R only strips trailing - spaces - $ typeset -L3 x - $ x=' ^I^J^M 2' - $ echo "($x)" - (2 ) - $ typeset -R3 y - $ x='2^I^J^M ' - $ echo "($x)" - (^I^J^M) - $ - - (osf/1 + others?) - $ typeset +i RANDOM - Memory fault (core dumped) - - (osf/1 + others?): -L/-R/-Z clear -l/-u after assignment and vise versa - $ typeset -u x=ab - $ echo "($x)" - (AB) - $ typeset -L4 x=def - $ echo "($x)" - (DEF ) - $ typeset | grep ' x$' - leftjust 4 x - $ - $ typeset -L4 x=def - $ echo "($x)" - (def ) - $ typeset -u x=ab - $ echo "($x)" - (AB ) - $ typeset | grep ' x$' - uppercase x - $ - $ typeset -i x - $ x='2()' - $ x='()' - $ x='2(4)' - - (osf/1, others?) - $ unset foo - $ echo "${foo:-"*"}" - <results of * expansion> - $ - - (osf/1, others?) - $ alias blah - blah: alias not found - $ alias -x blah | grep blah - blah - $ type blah - Memory fault (core dumped) - - (osf/1, others?) - $ trap 'echo hi; false' ERR - $ false - hi - hi - .... - Memory fault (core dumped) - - (osf/1, others?) - $ typeset +i ERRNO - Memory fault (core dumped) - - (osf/1, others?) - $ X=abcdef - $ echo ${X#a{b,c}e} # does not match {} inside word part of ${..#..} - abcdefe} - $ - - (osf/1, others?) - $ x=f=abcdef - $ echo ${f#a|abc} - def - $ echo ${f#abc|a} - bcdef - $ echo ${f#abc|a|d} - abcdef - $ - - (osf/1, hp-ux, others?) - $ i() echo hi - $ typeset -f - function i - { - hi - $ - - (osf/1, others?) - $ function X { - echo start of X - function Y { - echo in Y - } - echo end of X - } - $ X - start of X - end of X - $ typeset -f - function X - { - echo start of X - function Y { - echo in Y - } - echo end of X - } - function Y - { - echo in Y - echo end of X - } - } - $ - - (osf/1, others?) - $ while read x; do print -r "A $x"; done |& - [1] 18212 - $ exec 8<&p - $ kill %1 - Memory fault - - (osf/1, others?) Error only happens for builtin commands (/bin/echo works) - $ while read x; do print -r "A $x"; done |& - [1] 18212 - $ echo hi <&p - hi - $ echo hi <&p - ksh: p: bad file unit number - $ while read x; do print -r "A $x"; done |& - ksh: process already exists - $ - - (osf/1, others?) in restricted shells, command -p should not work. - $ PATH=/tmp ksh -r - $ print hi | command -p cat -n - 1 hi - $ - - (osf/1, others?) error message wrong for autoload files that don't define - functions - $ FPATH=/tmp - $ echo echo hi there > /tmp/aja - $ aja - hi there - ksh: echo: not found - $ - - (SunOS M-12/28/93d): - $ cat -n << X $( - > echo foo - > ) - > X - > echo bar - ) - ./ksh93: X: cannot open [No such file or directory] - Memory fault (core dumped) - POSIX sh questions (references are to POSIX 1003.2-1992) - arithmetic expressions: how are empty expressions treated? (eg, echo $(( ))). at&t ksh (and now pdksh) echo 0. |