2 .\" Copyright 1989 AT&T Copyright (c) 2005, 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 CKPATH 1 "Nov 4, 2005"
8 ckpath, errpath, helppath, valpath \- display a prompt; verify and return a
13 \fBckpath\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-a\fR | l] [\fB-b\fR | c | f | y]
14 [\fB-n\fR [o | z]] [\fB-rtwx\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
15 [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
20 \fB/usr/sadm/bin/errpath\fR [\fB-W\fR \fIwidth\fR] [\fB-a\fR | l] [\fB-b\fR | c | f | y]
21 [\fB-n\fR [o | z]] [\fB-rtwx\fR] [\fB-e\fR \fIerror\fR]
26 \fB/usr/sadm/bin/helppath\fR [\fB-W\fR \fIwidth\fR] [\fB-a\fR | l] [\fB-b\fR | c | f | y]
27 [\fB-n\fR [o | z]] [\fB-rtwx\fR] [\fB-h\fR \fIhelp\fR]
32 \fB/usr/sadm/bin/valpath\fR [\fB-a\fR | l] [\fB-b\fR | c | f | y]
33 [\fB-n\fR [o | z]] [\fB-rtwx\fR] \fIinput\fR
39 The \fBckpath\fR utility prompts a user and validates the response. It defines,
40 among other things, a prompt message whose response should be a pathname, text
41 for help and error messages, and a default value (which is returned if the user
42 responds with a RETURN).
45 The pathname must obey the criteria specified by the first group of options. If
46 no criteria is defined, the pathname must be for a normal file that does not
47 yet exist. If neither \fB-a\fR (absolute) or \fB-l\fR (relative) is given, then
48 either is assumed to be valid.
51 All messages are limited in length to 79 characters and are formatted
52 automatically. Tabs and newlines are removed after a single white space
53 character in a message definition, but spaces are not removed. When a tilde is
54 placed at the beginning or end of a message definition, the default text is
55 inserted at that point, allowing both custom text and the default text to be
59 If the prompt, help or error message is not defined, the default message (as
60 defined under EXAMPLES) is displayed.
63 Three visual tool modules are linked to the \fBckpath\fR command. They are
64 \fBerrpath\fR (which formats and displays an error message on the standard
65 output), \fBhelppath\fR (which formats and displays a help message on the
66 standard output), and \fBvalpath\fR (which validates a response).
70 The following options are supported:
77 Pathname must be an absolute path.
86 Pathname must be a block special file.
95 Pathname must be a character special file.
101 \fB\fB-d\fR \fIdefault\fR\fR
104 Defines the default value as \fIdefault\fR. The default is not validated and so
105 does not have to meet any criteria.
111 \fB\fB-e\fR \fIerror\fR\fR
114 Defines the error message as \fI error\fR.
123 Pathname must be a regular file.
129 \fB\fB-h\fR \fIhelp\fR\fR
132 Defines the help message as \fI help\fR.
138 \fB\fB-k\fR \fIpid\fR\fR
141 Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
151 Pathname must be a relative path.
160 Pathname must not exist (must be new).
169 Pathname must exist (must be old).
175 \fB\fB-p\fR \fIprompt\fR\fR
178 Defines the prompt message as \fIprompt\fR.
187 Specifies that \fBquit\fR is not allowed as a valid response.
196 Pathname must be readable.
202 \fB\fB-s\fR \fIsignal\fR\fR
205 Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
206 is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
207 specified, \fBSIGTERM\fR is used.
216 Pathname must be creatable (touchable). Pathname will be created if it does not
226 Pathname must be writable.
232 \fB\fB-W\fR \fIwidth\fR\fR
235 Specify that prompt, help and error messages be formatted to a line length of
245 Pathname must be executable.
254 Pathname must be a directory.
263 Pathname must have a file having a size greater than zero bytes.
269 The following operand is supported:
276 Input to be verified against validation options.
282 The text of the default messages for \fBckpath\fR depends upon the criteria
283 options that have been used.
285 \fBExample 1 \fRDefault prompt
288 An example default prompt for \fBckpath\fR (using the \fB-a\fR option) is:
293 example% \fBckpath \fR\fB-a\fR
294 Enter an absolute pathname [?,q]
300 \fBExample 2 \fRDefault error message
303 An example default error message (using the \fB-a\fR option) is:
308 example% \fB/usr/sadm/bin/errpath \fR\fB-a\fR
309 ERROR: A pathname is a filename, optionally preceded by parent
311 The pathname you enter: - must begin with a slash (/)
317 \fBExample 3 \fRDefault help message
320 An example default help message (using the \fB-a\fR option) is:
325 example% \fB/usr/sadm/bin/helppath \fR\fB-a\fR
326 A pathname is a filename, optionally preceded by parent directories.
327 The pathname you enter: - must begin with a slash (/)
333 \fBExample 4 \fRThe quit option
336 When the quit option is chosen (and allowed), \fBq\fR is returned along with
337 the return code \fB3\fR. Quit input gets a trailing newline.
340 \fBExample 5 \fRUsing the valpath module
343 The \fBvalpath\fR module will produce a usage message on stderr. It returns
344 \fB0\fR for success and non-zero for failure.
349 example% \fB/usr/sadm/bin/valpath\fR
350 usage: valpath [\fB-[a|l][b|c|f|y][n|[o|z]]rtwx\fR] input
361 The following exit values are returned:
368 Successful execution.
377 \fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
386 Mutually exclusive options.
395 User termination (quit).
404 Mutually exclusive options.
410 \fBsignal.h\fR(3HEAD), \fBattributes\fR(5)