Common Desktop Environment: Desktop KornShell User's Guide

Preface

The Desktop KornShell User's Guide provides the information you need to create Motif applications with KornShell (kshell) scripts. In addition to the basic information you'll need to get started, several example scripts of increasing complexity are described. Throughout this guide the term dtksh means the Desktop KornShell.

Who Should Use This Guide

This guide is intended for programmers who want a quick and easy means of creating Motif applications, but don't have the time, knowledge, or inclination to use the C programming language. A good understanding of kshell programming, Motif, the Xt Intrinsics, and, to a lesser extent, Xlib is needed. An understanding of C would also be helpful.

How This Guide Is Organized

Chapter 1, Introduction to Desktop KornShell describes the basic information you need to begin writing Motif applications in dtksh scripts.

Chapter 2, A Sample Script describes two simple dtksh scripts. The first script creates a push button widget within a bulletin board widget. The second script expands the first by adding a callback for the push button.

Chapter 3, Advanced Topics describes more advanced topics pertaining to dtksh scripts.

Chapter 4, A Complex Script describes a much more complex script than either of the ones described in Chapter 2. This script creates a graphic interface to the find command.

Appendix A, dtksh Commands lists all the dtksh commands.

Appendix B, dtksh Convenience Functions contains man pages for commands or functions that are not documented elsewhere.

Appendix C, The script_find Script contains the complete listing of the complex script described in Chapter 4.

Related Books

The following books provide information on kshell programming, Motif, the Xt Intrinsics, and Xlib:

Ordering Sun Documents

Fatbrain.com, an Internet professional bookstore, stocks select product documentation from Sun Microsystems, Inc.

For a list of documents and how to order them, visit the Sun Documentation Center on Fatbrain.com at http://www1.fatbrain.com/documentation/sun.

Accessing Sun Documentation Online

The docs.sun.comSM Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.

What Typographic Conventions Mean

The following table describes the typographic changes used in this book.

Table P-1 Typographic Conventions

Typeface or Symbol 

Meaning 

Example 

AaBbCc123

 The names of commands, files, and directories; on-screen computer output

Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

AaBbCc123

 What you type, contrasted with on-screen computer outputmachine_name% su Password:

AaBbCc123

 Command-line placeholder: replace with a real name or value

To delete a file, type rm filename.

AaBbCc123

Book titles, new words, or terms, or words to be emphasized. 

Read Chapter 6 in User's Guide.

These are called class options.

You must be root to do this.

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table P-2 Shell Prompts

Shell 

Prompt 

 C shell promptmachine_name%
 C shell superuser promptmachine_name#
 Bourne shell and Korn shell prompt$
 Bourne shell and Korn shell superuser prompt#