dtksh...?

dtksh...?

Post by Don Bari » Tue, 11 Nov 1997 04:00:00



I can find little in usenet on dtksh. Is anyone doing
much with it? Anyone tried it?

Don Barile
--
 __

  Don Barile  


 
 
 

dtksh...?

Post by James R. Mart » Sat, 15 Nov 1997 04:00:00


: I can find little in usenet on dtksh. Is anyone doing
: much with it? Anyone tried it?

Dtksh is nothing more than ksh93 with a xwindows library bound in
to the code with that shell's ability to bind such executables to ksh
functions, if the OS supports runtime loading of libraries. As Mr. Korn
states:

You can get a complete list of the special built-in commands with
builtin -s. In addition builtin without arguments gives a list of
the current built-ins and the pathname that  they are  associated
with.   A  built-in can be bound to another pathname by giving
the  pathname for  the built-in.   The basename  of  this  path
must  be  the  name of an existing built-in for this to succeed.
Specifying the name  of the built-in without a pathname causes this
built-in to be found before a path search.  On systems with run
time loading of libraries, built-in commands can be added with the
builtin command.  Each command that is to be built-in must be
written as a C function whose name is of the form b_name, where
name is the name of the built-in that is to be added.  The function
has the same argument calling convention as main.  The lower eight
bits of the return value become the exit status for this built-in.
Builtins are added by specifying the pathname of the library as an
argument to the -f option of builtin.

Take a look at the following URLs:

http://landru.unx.com/~pend/dtksh.html #dtksh (incl'd with CDE compliant machs)
http://www.partner.digital.com/www-swdev/pages/Home/TECH/CDE/htmldocs... #dtksh tutorial!

--
james martin


 
 
 

1. Read bug in ksh93 (dtksh)

The following code works as expected in ksh88:

$ echo "pat\c" | read pat;echo "pat='$pat'"
pat='pat'

in ksh93:

$ ksh93
$ echo "pat\c" | read pat;echo "pat='$pat'"
pat='pa'
$ exit;dtksh
$ echo "pat\c" | read pat;echo "pat='$pat'"
pat='pa'

I discovered this quite by accident while adding functionality to
nedit.  I wrote a nedit macro that selects the current word
and filters it to a dtksh script.  The filtering process cats the file
without a newline.  The dtksh reads the pattern,  then uses it to
grep a database of Applix macro names and completes the macro.  If
more than 1 name is found,  a Selection Box dialog is posted so you
can select the correct function.  I used:

read pat

to get the pattern,  but it kept coming back 1 char short.  I had to
change that to:

pat="$(cat)"

Opinions expressed herein are my own and may not represent those of my employer.

2. Adaptec 1542B SCSI card not working for Slackware 2.3.0

3. Registering new widgets in AIX dtksh

4. Can't connect to yahoo with Redhat 9

5. Simple dtksh Questions

6. nothing compiles now!

7. /usr/dt/bin/dtksh and /usr/bin/ksh

8. DOOM problem : Error: Game mode indeterminate

9. Attaching C code to dtksh

10. X/Motif programming with dtksh

11. /usr/dt/examples/dtksh/DtWsTest1 failure

12. dtksh (Desktop Korn Shell) ?

13. dtksh and cgi