1vc(1)                            User Commands                           vc(1)
2
3
4

NAME

6       vc - version control
7

SYNOPSIS

9       vc [-a] [-t] [-c char] [-s]
10            [keyword=value... keyword=value]
11
12

DESCRIPTION

14       This command is obsolete and will be removed in the next release.
15
16
17       The  vc  command  copies  lines from the standard input to the standard
18       output under control of its  arguments and  of  ``control  statements''
19       encountered  in  the  standard  input. In the process of performing the
20       copy operation, user-declared keywords may be replaced by their  string
21       value when they appear in plain text and/or control statements.
22
23
24       The  copying of lines from the standard input to the standard output is
25       conditional, based on tests (in control statements) of  keyword  values
26       specified in control statements or as vc command arguments.
27
28
29       A  control  statement is a single line beginning with a control charac‐
30       ter, except as modified by the -t keyletter (see  below).  The  default
31       control  character is colon (:), except as modified by the -c keyletter
32       (see below). Input lines beginning with a backslash (\) followed  by  a
33       control  character are not control lines and are copied to the standard
34       output with the backslash removed. Lines  beginning  with  a  backslash
35       followed by a non-control character are copied in their entirety.
36
37
38       A  keyword  is  composed  of 9 or less alphanumerics; the first must be
39       alphabetic. A value is any ASCII string that can be created with ed;  a
40       numeric  value  is an unsigned string of digits. Keyword values may not
41       contain blanks or tabs.
42
43
44       Replacement of keywords by values is  done  whenever  a  keyword   sur‐
45       rounded  by  control  characters  is  encountered  on a version control
46       statement. The -a keyletter (see below) forces replacement of  keywords
47       in  all  lines  of  text.  An  uninterpreted  control  character may be
48       included in a value by preceding it with \. If a literal \ is  desired,
49       then it too must be preceded by \.
50

OPTIONS

52       The following options are supported:
53
54       -a        Forces  replacement of keywords surrounded by control charac‐
55                 ters with their assigned value in all text lines and not just
56                 in vc statements.
57
58
59       -t        All characters from the beginning of a line up to and includ‐
60                 ing the first tab character are ignored for  the  purpose  of
61                 detecting  a  control  statement.  If  a control statement is
62                 found, all characters up to and including the  tab  are  dis‐
63                 carded.
64
65
66       -cchar    Specifies  a  control  character  to  be used in place of the
67                 ``:'' default.
68
69
70       -s        Silences warning  messages  (not  error)  that  are  normally
71                 printed on the diagnostic output.
72
73
74
75       vc recognizes the following version control statements:
76
77       :dcl keyword[, ..., keyword]
78
79           Declare keywords.  All keywords must be declared.
80
81
82       :asg keyword=value
83
84           Assign  values  to keywords. An asg statement overrides the assign‐
85           ment for the corresponding keyword on the vc command line  and  all
86           previous  asg  statements  for  that  keyword.  Keywords  that  are
87           declared but are not assigned values have null values.
88
89
90       :if condition
91       ...
92       :end
93
94           Skip lines of the standard input. If the  condition  is  true,  all
95           lines  between  the if statement and the matching end statement are
96           copied to the standard output.  If  the  condition  is  false,  all
97           intervening  lines  are  discarded,  including  control statements.
98           Note:  Intervening if statements and matching  end  statements  are
99           recognized  solely for the purpose of maintaining the proper if-end
100           matching.
101
102           The syntax of a condition is:
103
104           <cond>     ::=  [ ``not'' ] <or>
105
106
107           <or>       ::=  <and> | <and> ``|'' <or>
108
109
110           <and>      ::=  <exp> | <exp> ``&'' <and>
111
112
113           <exp>      ::=  ``('' <or> ``)'' | <value> <op> <value>
114
115
116           <op>       ::=  ``='' | ``!='' | ``<'' | ``>''
117
118
119           <value>    ::=  <arbitrary ASCII string> | <numeric string>
120
121           The available operators and their meanings are:
122
123           =      equal
124
125
126           !=     not equal
127
128
129           &      and
130
131
132           |      or
133
134
135           >      greater than
136
137
138           <      less than
139
140
141           ()     used for logical groupings
142
143
144           not    may only occur immediately after the if, and  when  present,
145                  inverts the value of the entire condition
146
147           The > and < operate only on unsigned integer values (for example, :
148           012 > 12 is false). All other operators take strings  as  arguments
149           (for example, : 012 != 12 is true).
150
151           The precedence of the operators (from highest to lowest) is:
152
153           = != > <    all of equal precedence
154
155
156           &
157
158
159           |
160
161           Parentheses may be used to alter the order of precedence.
162
163           Values  must be separated from operators or parentheses by at least
164           one blank or tab.
165
166
167       ::text
168
169           Replace keywords on lines that are copied to the  standard  output.
170           The  two  leading control characters are removed, and keywords sur‐
171           rounded by control characters in text are replaced by  their  value
172           before  the line is copied to the output file. This action is inde‐
173           pendent of the -a keyletter.
174
175
176       :on
177       :off
178
179           Turn on or off keyword replacement on all lines.
180
181
182       :ctl char
183
184           Change the control character to char.
185
186
187       :msg message
188
189           Print message on the diagnostic output.
190
191
192       :err message
193
194           Print message followed by:
195
196                 ERROR: err statement on line ... (915)
197
198           on the diagnostic output. vc halts execution, and returns  an  exit
199           code of 1.
200
201

ATTRIBUTES

203       See attributes(5) for descriptions of the following attributes:
204
205
206
207
208       ┌─────────────────────────────┬─────────────────────────────┐
209       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
210       ├─────────────────────────────┼─────────────────────────────┤
211       │Availability                 │SUNWsprot                    │
212       └─────────────────────────────┴─────────────────────────────┘
213

SEE ALSO

215       ed(1), attributes(5)
216
217
218
219SunOS 5.11                        5 Jul 1990                             vc(1)
Impressum