Questions tagged [pdksh]

pdksh is the public domain clone of the AT&T Bell Labs Korn shell.

pdksh lacks the following features of the official version:

  • The built-in variable LINES.

  • The DEBUG fake signal. The fake signals ERR and EXIT within functions.

  • Functions inherit the trap settings of the main script.

  • The POSIX file expansion character classes ([[:alpha:]], etc.) are not available.

  • The read command and select loop do not use the command-line editing modes.

  • The last command of a pipeline is not run in the parent shell. Thus, echo hi | read x; print $x doesn't work the same as in ksh. (Most Bourne-style shells work this same way.)

  • The set -o option form of ksh is set -X option in pdksh.

pdksh is superseded by mksh, The MirBSD Korn Shell; pdksh has last seen active upstream development in 1999.

7 questions
3
votes
2 answers

strange behavior when using recursion in ksh93

I'm facing some problems in ksh93, when going through directories recursively. create some files and directories. base=/tmp/nonsens for i in {1..3} do mkdir -p ${base}/dir${i} for j in {1..2} do mkdir ${base}/dir${i}/dir${j} …
cheko
  • 31
  • 1
2
votes
2 answers

Is there an explanation of the difference between export and typeset in combination with nested function calls in a KornShell script?

I have encountered an issue with KornShell (ksh) scripts running differently on ksh88 & ksh93 wherein functions which call functions handle differently, variables declared with typeset and export. Here is an example script that highlights the…
Bernard Assaf
  • 75
  • 1
  • 9
1
vote
3 answers

Does pdksh (public domain kornShell) support associative arrays?

I recently ran up against a wall doing some bash shell programming where an associative array would have solved my problems. I googled about features of the KornShell (ksh) and learned that it supports associative arrays, so I installed Cygwin's…
Dexygen
  • 12,287
  • 13
  • 80
  • 147
0
votes
1 answer

pdksh time built-in function does not work

$ time -p sleep 5 real 8.33 user 0.00 sys 0.00 $ /usr/bin/time -p sleep 5 real 5.00 user 0.00 sys 0.00 $ echo $KSH_VERSION @(#)PD KSH v5.2.14 99/07/13.2 I have noticed this issue: on Red Hat Enterprise Linux Server release 6.8 (Santiago). and on…
BOC
  • 1,109
  • 10
  • 20
0
votes
0 answers

How to activate POSIX mode on KSH93

I have a script that is running on Redhat 5.11 machine with a type of SHELL pdksh. However, when I run the same script on Redhat 7.1 with the KSH93 shell it gives me the following error: ./script.ksh[212]: set: posix: bad option(s) Usage: set …
user3535890
  • 13
  • 1
  • 6
0
votes
4 answers

cygwin : pdksh(5.2.14-3) doesn't support backslash path (\)

as an replacement for ksh under cygwin, pdksh might be the only choice. but look like there have a bug for cygwin : pdksh(5.2.14-3) to support backslash path (\). it will swallow the \ : $ cd .\access pdksh: cd: /cygdrive/e/.access - No such file or…
shawn2001
  • 1
  • 1
-1
votes
1 answer

(pdksh) Looping through n files and store their dates in array

Using pdksh stat() command is unavailable on system. I need to loop through the amount of files found and store their dates in an array. $COMMAND stores the number of files found in $location as can be seen below. Can someone help me…