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

NAME

6       ckyorn, erryorn, helpyorn, valyorn - prompts for and validates yes/no
7

SYNOPSIS

9       ckyorn [-Q] [-W width] [-d default] [-h help] [-e error]
10            [-p prompt] [-k pid [-s signal]]
11
12
13       /usr/sadm/bin/erryorn [-W width] [-e error]
14
15
16       /usr/sadm/bin/helpyorn [-W width] [-h help]
17
18
19       /usr/sadm/bin/valyorn input
20
21

DESCRIPTION

23       ckyorn  prompts  a  user  and validates the response. It defines, among
24       other things, a prompt message for a yes or no answer,  text  for  help
25       and  error messages, and a default value (which is returned if the user
26       responds with a RETURN).
27
28
29       All messages are limited in length to 70 characters and  are  formatted
30       automatically.  Any  white space used in the definition (including new‐
31       line) is stripped. The -W option cancels the automatic formatting. When
32       a  tilde is placed at the beginning or end of a message definition, the
33       default text is inserted at that point, allowing both custom  text  and
34       the default text to be displayed.
35
36
37       If  the  prompt, help or error message is not defined, the default mes‐
38       sage (as defined under NOTES) is displayed.
39
40
41       Three visual tool modules are linked to the ckyorn  command.  They  are
42       erryorn  (which formats and displays an error message), helpyorn (which
43       formats and displays a help message), and valyorn  (which  validates  a
44       response).  These  modules  should  be  used  in conjunction with  FACE
45       objects. In this instance, the  FACE object defines the prompt.
46

OPTIONS

48       The following options are supported:
49
50       -d default    Defines the default value as default. The default is  not
51                     validated and so does not have to meet any criteria.
52
53
54       -e error      Defines the error message as error.
55
56
57       -h help       Defines the help messages as help.
58
59
60       -k pid        Specifies  that  process ID pid is to be sent a signal if
61                     the user chooses to abort.
62
63
64       -p prompt     Defines the prompt message as prompt.
65
66
67       -Q            Specifies that quit  will  not  be  allowed  as  a  valid
68                     response.
69
70
71       -s signal     Specifies  that  the  process  ID pid defined with the -k
72                     option is to be sent signal signal when quit  is  chosen.
73                     If no signal is specified, SIGTERM is used.
74
75
76       -W width      Specifies  that  prompt,  help and error messages will be
77                     formatted to a line length of width.
78
79

OPERANDS

81       The following operand is supported:
82
83       input    Input to be verified as y, yes, or n, no (in  any  combination
84                of upper- and lower-case letters).
85
86

EXIT STATUS

88       The following exit values are returned:
89
90       0    Successful execution.
91
92
93       1    EOF on input, or negative width on  -W option,  or usage error.
94
95
96       2    Usage error.
97
98
99       3    User termination (quit).
100
101

ATTRIBUTES

103       See attributes(5) for descriptions of the following attributes:
104
105
106
107
108       ┌─────────────────────────────┬─────────────────────────────┐
109       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
110       ├─────────────────────────────┼─────────────────────────────┤
111       │Availability                 │SUNWcsu                      │
112       └─────────────────────────────┴─────────────────────────────┘
113

SEE ALSO

115       attributes(5)
116

NOTES

118       The default prompt for ckyorn is:
119
120         Yes or No [y,n,?,q]:
121
122
123
124
125       The default error message is:
126
127         ERROR - Please enter yes or no.
128
129
130
131
132       The default help message is:
133
134         To respond in the affirmative, enter y, yes, Y, or YES.
135         To respond in the negative, enter n, no, N, or NO.
136
137
138
139
140       When  the quit option is chosen (and allowed), q is returned along with
141       the return code 3. The valyorn module will not produce any  output.  It
142       returns  0 for success and non-zero for failure.
143
144
145
146SunOS 5.11                        14 Sep 1992                        ckyorn(1)
Impressum