1ckkeywd(1)                       User Commands                      ckkeywd(1)
2
3
4

NAME

6       ckkeywd - prompts for and validates a keyword
7

SYNOPSIS

9       ckkeywd [-Q] [-W width] [-d default] [-h help] [-e error]
10            [-p prompt] [-k pid [-s signal]] keyword [...]
11
12

DESCRIPTION

14       ckkeywd  prompts  a  user and validates the response. It defines, among
15       other things, a prompt message whose response should be one  of a  list
16       of  keywords,  text  for  help  and error messages, and a default value
17       (which will be returned if the user responds with a  carriage  return).
18       The  answer  returned  from  this command must match one of the defined
19       list of keywords.
20
21
22       All messages are limited in length to 70 characters and  are  formatted
23       automatically.  Any  white space used in the definition (including new‐
24       line) is stripped.  The -W option  cancels  the  automatic  formatting.
25       When a tilde is placed at the beginning or end of a message definition,
26       the default text will be inserted at that point, allowing  both  custom
27       text and the default text to be displayed.
28
29
30       If  the  prompt, help or error message is not defined, the default mes‐
31       sage (as defined under NOTES) will be displayed.
32

OPTIONS

34       The following options are supported:
35
36       -d default    Defines the default value as default. The default is  not
37                     validated and so does not have to meet any criteria.
38
39
40       -e error      Defines the error message as  error.
41
42
43       -h help       Defines the help messages as  help.
44
45
46       -k pid        Specifies  that process  ID pid is to be sent a signal if
47                     the user chooses to abort.
48
49
50       -p prompt     Defines the prompt message as prompt.
51
52
53       -Q            Specifies that quit  will  not  be  allowed  as  a  valid
54                     response.
55
56
57       -s signal     Specifies  that  the  process  ID pid defined with the -k
58                     option is to be sent signal  signal when quit is  chosen.
59                     If no signal is specified, SIGTERM is used.
60
61
62       -W width      Specifies  that  prompt,  help and error messages will be
63                     formatted to a line length of width.
64
65

OPERANDS

67       The following operand is supported:
68
69       keyword    Defines the keyword, or list of keywords, against which  the
70                  answer will be verified.
71
72

EXIT STATUS

74       The following exit values are returned:
75
76       0    Successful execution.
77
78
79       1    EOF  on input, or negative width on -W option, or no keywords from
80            which to choose, or usage error.
81
82
83       3    User termination (quit).
84
85

ATTRIBUTES

87       See attributes(5) for descriptions of the following attributes:
88
89
90
91
92       ┌─────────────────────────────┬─────────────────────────────┐
93       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
94       ├─────────────────────────────┼─────────────────────────────┤
95       │Availability                 │SUNWcsu                      │
96       └─────────────────────────────┴─────────────────────────────┘
97

SEE ALSO

99       attributes(5)
100

NOTES

102       The default prompt for ckkeywd is:
103
104         Enter appropriate value [keyword,[...],?,q]:
105
106
107
108
109       The default error message is:
110
111         ERROR: Please enter one of the following keywords: keyword,[...],q
112
113
114
115
116       The default help message is:
117
118         keyword,[...],q
119
120
121
122
123       When the quit option is chosen (and allowed), q is returned along  with
124       the return code 3.
125
126
127
128SunOS 5.11                        14 Sep 1992                       ckkeywd(1)
Impressum