2 .\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CKKEYWD 1 "Sep 14, 1992"
8 ckkeywd \- prompts for and validates a keyword
12 \fBckkeywd\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR] [\fB-e\fR \fIerror\fR]
13 [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]] \fIkeyword\fR [...]
19 \fBckkeywd\fR prompts a user and validates the response. It defines, among
20 other things, a prompt message whose response should be one of a list of
21 keywords, text for help and error messages, and a default value (which will be
22 returned if the user responds with a carriage return). The answer returned
23 from this command must match one of the defined list of keywords.
26 All messages are limited in length to 70 characters and are formatted
27 automatically. Any white space used in the definition (including newline) is
28 stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde
29 is placed at the beginning or end of a message definition, the default text
30 will be inserted at that point, allowing both custom text and the default text
34 If the prompt, help or error message is not defined, the default message (as
35 defined under \fBNOTES\fR) will be displayed.
39 The following options are supported:
43 \fB\fB-d\fR\fI default\fR\fR
46 Defines the default value as \fIdefault\fR. The default is not validated and so
47 does not have to meet any criteria.
53 \fB\fB-e\fR\fI error\fR\fR
56 Defines the error message as \fI error\fR.
62 \fB\fB-h\fR\fI help\fR\fR
65 Defines the help messages as \fI help\fR.
71 \fB\fB-k\fR\fI pid\fR\fR
74 Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
81 \fB\fB-p\fR\fI prompt\fR\fR
84 Defines the prompt message as \fIprompt\fR.
93 Specifies that quit will not be allowed as a valid response.
99 \fB\fB-s\fR\fI signal\fR\fR
102 Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
103 is to be sent signal \fI signal\fR when quit is chosen. If no signal is
104 specified, \fBSIGTERM\fR is used.
110 \fB\fB-W\fR\fI width\fR\fR
113 Specifies that prompt, help and error messages will be formatted to a line
114 length of \fIwidth\fR.
120 The following operand is supported:
127 Defines the keyword, or list of keywords, against which the answer will be
134 The following exit values are returned:
141 Successful execution.
150 \fBEOF\fR on input, or negative width on \fB-W\fR option, or no keywords from
151 which to choose, or usage error.
160 User termination (quit).
170 The default prompt for \fBckkeywd\fR is:
174 Enter appropriate value [\fIkeyword\fR,[\|.\|.\|.\|],?,q]:
181 The default error message is:
185 ERROR: Please enter one of the following keywords: \fIkeyword\fR,[\|.\|.\|.\|],q
192 The default help message is:
196 \fIkeyword\fR\fB,[\|.\|.\|.\|],q\fR
203 When the quit option is chosen (and allowed), \fBq\fR is returned along with
204 the return code \fB3\fR.