1 .\" $NetBSD: t4,v 1.3 2010/08/22 02:19:07 perry Exp $
3 .\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions are
9 .\" Redistributions of source code and documentation must retain the above
10 .\" copyright notice, this list of conditions and the following
13 .\" Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" All advertising materials mentioning features or use of this software
18 .\" must display the following acknowledgement:
20 .\" This product includes software developed or owned by Caldera
21 .\" International, Inc. Neither the name of Caldera International, Inc.
22 .\" nor the names of other contributors may be used to endorse or promote
23 .\" products derived from this software without specific prior written
26 .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
27 .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
28 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 .\" DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
31 .\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
34 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36 .\" OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
37 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 .\" @(#)t4 8.1 (Berkeley) 8/14/93
43 Appendix\ A\ -\ Grammar
45 Note: This grammar needs updating, it is obsolete.
55 command: simple-command
56 \fB( \fIcommand-list \fB)
57 \fB{ \fIcommand-list \fB}
58 \fBfor \fIname \fBdo \fIcommand-list \fBdone
59 \fBfor \fIname \fBin \fIword \*(ZZ \fBdo \fIcommand-list \fBdone
60 \fBwhile \fIcommand-list \fBdo \fIcommand-list \fBdone
61 \fBuntil \fIcommand-list \fBdo \fIcommand-list \fBdone
62 \fBcase \fIword \fBin \fIcase-part \*(ZZ \fBesac
63 \fBif \fIcommand-list \fBthen \fIcommand-list \fIelse-part \fBfi
66 pipeline \fB\*(VT\fI command
69 andor \fB&&\fI pipeline
70 andor \fB\*(VT\*(VT\fI pipeline
75 command-list \fB;\fI andor
76 command-list \fB&\fI andor
78 input-output: \fB> \fIfile
87 case-part: pattern\fB ) \fIcommand-list\fB ;;
90 pattern \fB\*(VT\fI word
92 \fIelse-part: \fBelif \fIcommand-list\fB then\fI command-list else-part\fP
93 \fBelse \fIcommand-list\fI
98 word: \fRa sequence of non-blank characters\fI
100 name: \fRa sequence of letters, digits or underscores starting with a letter\fI
102 digit: \fB0 1 2 3 4 5 6 7 8 9\fP
107 Appendix\ B\ -\ Meta-characters\ and\ Reserved\ Words
115 .IP \fB\*(VT\*(VT\fR 6
128 input from a here document
139 match any character(s) including none
141 match any single character
143 match any of the enclosed characters
150 substitute shell variable
152 substitute command output
154 substitute command output
156 substitute arithmetic expression
163 quote the next character
165 quote the enclosed characters except for \'
167 quote the enclosed characters except
177 for while until do done