.\" %sccs.include.proprietary.roff% .\" .\" @(#)t4 8.1 (Berkeley) 08/14/93 .\" .bp .SH Appendix\ A\ -\ Grammar .LP .LD \fIitem: word input-output name = value .sp 0.8 simple-command: item simple-command item .sp 0.8 command: simple-command \fB( \fIcommand-list \fB) \fB{ \fIcommand-list \fB} \fBfor \fIname \fBdo \fIcommand-list \fBdone \fBfor \fIname \fBin \fIword \*(ZZ \fBdo \fIcommand-list \fBdone \fBwhile \fIcommand-list \fBdo \fIcommand-list \fBdone \fBuntil \fIcommand-list \fBdo \fIcommand-list \fBdone \fBcase \fIword \fBin \fIcase-part \*(ZZ \fBesac \fBif \fIcommand-list \fBthen \fIcommand-list \fIelse-part \fBfi .sp 0.8 \fIpipeline: command pipeline \fB\*(VT\fI command .sp 0.8 andor: pipeline andor \fB&&\fI pipeline andor \fB\*(VT\*(VT\fI pipeline .sp 0.8 command-list: andor command-list \fB;\fI command-list \fB&\fI command-list \fB;\fI andor command-list \fB&\fI andor .sp 0.8 input-output: \fB> \fIfile \fB< \fIfile \fB\*(AP \fIword \fB\*(HE \fIword .sp 0.8 file: word \fB&\fI digit \fB&\fI \(mi .sp 0.8 case-part: pattern\fB ) \fIcommand-list\fB ;; .sp 0.8 \fIpattern: word pattern \fB\*(VT\fI word .sp 0.8 \fIelse-part: \fBelif \fIcommand-list\fB then\fI command-list else-part\fP \fBelse \fIcommand-list\fI empty .sp 0.8 empty: .sp 0.8 word: \fRa sequence of non-blank characters\fI .sp 0.8 name: \fRa sequence of letters, digits or underscores starting with a letter\fI .sp 0.8 digit: \fB0 1 2 3 4 5 6 7 8 9\fP .DE .LP .bp .SH Appendix\ B\ -\ Meta-characters\ and\ Reserved\ Words .LP a) syntactic .RS .IP \fB\*(VT\fR 6 pipe symbol .IP \fB&&\fR 6 `andf' symbol .IP \fB\*(VT\*(VT\fR 6 `orf' symbol .IP \fB;\fP 6 command separator .IP \fB;;\fP 6 case delimiter .IP \fB&\fP 6 background commands .IP \fB(\ )\fP 6 command grouping .IP \fB<\fP 6 input redirection .IP \fB\*(HE\fP 6 input from a here document .IP \fB>\fP 6 output creation .IP \fB\*(AP\fP 6 output append .sp 2 .RE .LP b) patterns .RS .IP \fB\*(ST\fP 6 match any character(s) including none .IP \fB?\fP 6 match any single character .IP \fB[...]\fP 6 match any of the enclosed characters .sp 2 .RE .LP c) substitution .RS .IP \fB${...}\fP 6 substitute shell variable .IP \fB\`...\`\fP 6 substitute command output .sp 2 .RE .LP d) quoting .RS .IP \fB\e\fP 6 quote the next character .IP \fB\'...\'\fP 6 quote the enclosed characters except for \' .IP \fB"\&..."\fR 6 quote the enclosed characters except for \fB$ \` \e "\fP .sp 2 .RE .LP e) reserved words .DS .ft B if then else elif fi case in esac for while until do done { } .ft .DE