|
|
1.1 root 1: .\" @(#)t4 6.1 (Berkeley) 5/22/86
2: .\"
3: .bp
4: .SH
5: Appendix\ A\ -\ Grammar
6: .LP
7: .DS
8: \fIitem: word
9: input-output
10: name = value
11: .sp 0.8
12: simple-command: item
13: simple-command item
14: .sp 0.8
15: command: simple-command
16: \fB( \fIcommand-list \fB)
17: \fB{ \fIcommand-list \fB}
18: \fBfor \fIname \fBdo \fIcommand-list \fBdone
19: \fBfor \fIname \fBin \fIword \*(ZZ \fBdo \fIcommand-list \fBdone
20: \fBwhile \fIcommand-list \fBdo \fIcommand-list \fBdone
21: \fBuntil \fIcommand-list \fBdo \fIcommand-list \fBdone
22: \fBcase \fIword \fBin \fIcase-part \*(ZZ \fBesac
23: \fBif \fIcommand-list \fBthen \fIcommand-list \fIelse-part \fBfi
24: .sp 0.8
25: \fIpipeline: command
26: pipeline \fB\*(VT\fI command
27: .sp 0.8
28: andor: pipeline
29: andor \fB&&\fI pipeline
30: andor \fB\*(VT\*(VT\fI pipeline
31: .sp 0.8
32: command-list: andor
33: command-list \fB;\fI
34: command-list \fB&\fI
35: command-list \fB;\fI andor
36: command-list \fB&\fI andor
37: .sp 0.8
38: input-output: \fB> \fIfile
39: \fB< \fIfile
40: \fB\*(AP \fIword
41: \fB\*(HE \fIword
42: .sp 0.8
43: file: word
44: \fB&\fI digit
45: \fB&\fI \(mi
46: .sp 0.8
47: case-part: pattern\fB ) \fIcommand-list\fB ;;
48: .sp 0.8
49: \fIpattern: word
50: pattern \fB\*(VT\fI word
51: .sp 0.8
52: \fIelse-part: \fBelif \fIcommand-list\fB then\fI command-list else-part\fP
53: \fBelse \fIcommand-list\fI
54: empty
55: .sp 0.8
56: empty:
57: .sp 0.8
58: word: \fRa sequence of non-blank characters\fI
59: .sp 0.8
60: name: \fRa sequence of letters, digits or underscores starting with a letter\fI
61: .sp 0.8
62: digit: \fB0 1 2 3 4 5 6 7 8 9\fP
63: .DE
64: .LP
65: .bp
66: .SH
67: Appendix\ B\ -\ Meta-characters\ and\ Reserved\ Words
68: .LP
69: a) syntactic
70: .RS
71: .IP \fB\*(VT\fR 6
72: pipe symbol
73: .IP \fB&&\fR 6
74: `andf' symbol
75: .IP \fB\*(VT\*(VT\fR 6
76: `orf' symbol
77: .IP \fB;\fP 6
78: command separator
79: .IP \fB;;\fP 6
80: case delimiter
81: .IP \fB&\fP 6
82: background commands
83: .IP \fB(\ )\fP 6
84: command grouping
85: .IP \fB<\fP 6
86: input redirection
87: .IP \fB\*(HE\fP 6
88: input from a here document
89: .IP \fB>\fP 6
90: output creation
91: .IP \fB\*(AP\fP 6
92: output append
93: .sp 2
94: .RE
95: .LP
96: b) patterns
97: .RS
98: .IP \fB\*(ST\fP 6
99: match any character(s) including none
100: .IP \fB?\fP 6
101: match any single character
102: .IP \fB[...]\fP 6
103: match any of the enclosed characters
104: .sp 2
105: .RE
106: .LP
107: c) substitution
108: .RS
109: .IP \fB${...}\fP 6
110: substitute shell variable
111: .IP \fB\`...\`\fP 6
112: substitute command output
113: .sp 2
114: .RE
115: .LP
116: d) quoting
117: .RS
118: .IP \fB\e\fP 6
119: quote the next character
120: .IP \fB\'...\'\fP 6
121: quote the enclosed characters except for \'
122: .IP \fB"\&..."\fR 6
123: quote the enclosed characters except
124: for \fB$ \` \e "\fP
125: .sp 2
126: .RE
127: .LP
128: e) reserved words
129: .DS
130: .ft B
131: if then else elif fi
132: case in esac
133: for while until do done
134: { }
135: .ft
136: .DE
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.