1cktime(1) User Commands cktime(1)
2
3
4
6 cktime, errtime, helptime, valtime - display a prompt; verify and
7 return a time of day
8
10 cktime [-Q] [-W width] [-f format] [-d default] [-h help]
11 [-e error] [-p prompt] [-k pid [-s signal]]
12
13
14 /usr/sadm/bin/errtime [-W width] [-e error] [-f format]
15
16
17 /usr/sadm/bin/helptime [-W width] [-h help] [-f format]
18
19
20 /usr/sadm/bin/valtime [-f format] input
21
22
24 The cktime utility prompts a user and validates the response. It
25 defines, among other things, a prompt message whose response should be
26 a time, text for help and error messages, and a default value (which is
27 returned if the user responds with a RETURN). The user response must
28 match the defined format for the time of day.
29
30
31 All messages are limited in length to 70 characters and are formatted
32 automatically. Any white space used in the definition (including NEW‐
33 LINE) is stripped. The -W option cancels the automatic formatting. When
34 a tilde is placed at the beginning or end of a message definition, the
35 default text is inserted at that point, allowing both custom text and
36 the default text to be displayed.
37
38
39 If the prompt, help or error message is not defined, the default mes‐
40 sage (as defined under NOTES) is displayed.
41
42
43 Three visual tool modules are linked to the cktime command. They are
44 errtime (which formats and displays an error message), helptime (which
45 formats and displays a help message), and valtime (which validates a
46 response). These modules should be used in conjunction with FML
47 objects. In this instance, the FML object defines the prompt. When for‐
48 mat is defined in the errtime and helptime modules, the messages will
49 describe the expected format.
50
52 The following options are supported:
53
54 -d default Defines the default value as default. The default is not
55 validated and so does not have to meet any criteria.
56
57
58 -e error Defines the error message as error.
59
60
61 -f format Specifies the format against which the input will be ver‐
62 ified. Possible formats and their definitions are:
63
64 %H = hour (00 - 23)
65 %I = hour (00 - 12)
66 %M = minute (00 - 59)
67 %p = ante meridian or post meridian
68 %r = time as %I:%M:%S %p
69 %R = time as %H:%M (the default format)
70 %S = seconds (00 - 59)
71 %T = time as %H:%M:%S
72
73
74
75
76 -h help Defines the help messages as help.
77
78
79 -k pid Specifies that process ID pid is to be sent a signal if
80 the user chooses to abort.
81
82
83 -p prompt Defines the prompt message as prompt.
84
85
86 -Q Specifies that quit will not be allowed as a valid
87 response.
88
89
90 -s signal Specifies that the process ID pid defined with the -k
91 option is to be sent signal signal when quit is chosen.
92 If no signal is specified, SIGTERM is used.
93
94
95 -W width Specifies that prompt, help and error messages will be
96 formatted to a line length of width.
97
98
100 The following operand is supported:
101
102 input Input to be verified against format criteria.
103
104
106 The following exit values are returned:
107
108 0 Successful execution.
109
110
111 1 EOF on input, or negative width on -W option, or usage error .
112
113
114 3 User termination (quit) .
115
116
117 4 Garbled format argument.
118
119
121 See attributes(5) for descriptions of the following attributes:
122
123
124
125
126 ┌─────────────────────────────┬─────────────────────────────┐
127 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
128 ├─────────────────────────────┼─────────────────────────────┤
129 │Availability │SUNWcsu │
130 └─────────────────────────────┴─────────────────────────────┘
131
133 attributes(5)
134
136 The default prompt for cktime is:
137
138 Enter a time of day [?,q]:
139
140
141
142
143 The default error message is:
144
145 ERROR: Please enter the time of day. Format is <format>.
146
147
148
149
150 The default help message is:
151
152 Please enter the time of day. Format is <format>.
153
154
155
156
157 When the quit option is chosen (and allowed), q is returned along with
158 the return code 3. The valtime module will not produce any output. It
159 returns 0 for success and non-zero for failure.
160
161
162
163SunOS 5.11 14 Sep 1992 cktime(1)