]> git.ipfire.org Git - thirdparty/cups.git/blob - man/ipptoolfile.man
The ipptool program now supports EXPECT statements for collection member
[thirdparty/cups.git] / man / ipptoolfile.man
1 .\"
2 .\" "$Id$"
3 .\"
4 .\" ipptoolfile man page for CUPS.
5 .\"
6 .\" Copyright 2010-2014 by Apple Inc.
7 .\"
8 .\" These coded instructions, statements, and computer programs are the
9 .\" property of Apple Inc. and are protected by Federal copyright
10 .\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 .\" which should have been included with this file. If this file is
12 .\" file is missing or damaged, see the license at "http://www.cups.org/".
13 .\"
14 .TH ipptoolfile 5 "CUPS" "9 April 2014" "Apple Inc."
15 .SH NAME
16 ipptoolfile \- ipptool file format
17 .SH DESCRIPTION
18 The
19 .BR ipptool (1)
20 program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curly braces, for example:
21 .nf
22
23 # This is a comment
24 {
25 # The name of the test
26 NAME "Print PostScript File"
27
28 # The request to send
29 OPERATION Print\-Job
30 GROUP operation\-attributes\-tag
31 ATTR charset attributes\-charset utf\-8
32 ATTR language attributes\-natural\-language en
33 ATTR uri printer\-uri $uri
34 ATTR name requesting\-user\-name $user
35 FILE testfile.ps
36
37 # The response to expect
38 STATUS successful\-ok
39 EXPECT job\-id OF\-TYPE integer WITH\-VALUE >0
40 EXPECT job\-uri OF\-TYPE uri
41 }
42 {
43 # The name of the test
44 NAME "Get Attributes of PostScript Job"
45
46 # The request to send
47 OPERATION Get\-Job\-Attributes
48 GROUP operation\-attributes\-tag
49 ATTR charset attributes\-charset utf\-8
50 ATTR language attributes\-natural\-language en
51 ATTR uri printer\-uri $uri
52 ATTR integer job\-id $job\-id
53 ATTR name requesting\-user\-name $user
54
55 # The response to expect
56 STATUS successful\-ok
57 EXPECT job\-id OF\-TYPE integer WITH\-VALUE $job\-id
58 EXPECT job\-uri OF\-TYPE uri
59 EXPECT job\-state OF\-TYPE enum WITH\-VALUE 3,4,5,6,7,8,9
60 EXPECT job\-originating\-user\-name OF\-TYPE name WITH\-VALUE "$user"
61 }
62 .fi
63 .SS TOP-LEVEL DIRECTIVES
64 The following directives can be used outside of a \fItest\fR:
65 .TP 5
66 \fB{ \fItest \fB}\fR
67 Defines a test.
68 .TP 5
69 \fBDEFINE \fIvariable-name value\fR
70 Defines the named variable to the given value. This is equivalent to specifying \fI\-d variable-name=value\fR on the
71 .BR ipptool (8)
72 command-line.
73 .TP 5
74 \fBDEFINE\-DEFAULT \fIvariable-name value\fR
75 Defines the named variable to the given value if it does not already have a value.
76 .TP 5
77 \fBFILE\-ID "\fIidentifier\fB"\fR
78 Specifies an identifier string for the current file.
79 .TP 5
80 \fBIGNORE\-ERRORS yes\fR
81 .TP 5
82 \fBIGNORE\-ERRORS no\fR
83 Specifies whether, by default,
84 .BR ipptool (8)
85 will ignore errors and continue with subsequent tests.
86 .TP 5
87 \fBINCLUDE "\fIfilename\fB"\fR
88 .TP 5
89 \fBINCLUDE <\fIfilename\fB>\fR
90 Includes another test file. The first form includes a file relative to the current test file, while the second form includes a file from the
91 .BR ipptool (8)
92 include directory.
93 .TP 5
94 \fBINCLUDE\-IF\-DEFINED \fIname \fB"\fIfilename\fB"\fR
95 .TP 5
96 \fBINCLUDE\-IF\-DEFINED \fIname \fB<\fIfilename\fB>\fR
97 Includes another test file if the named variable is defined. The first form includes a file relative to the current test file, while the second form includes a file from the
98 .BR ipptool (8)
99 include directory.
100 .TP 5
101 \fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB"\fIfilename\fB"\fR
102 .TP 5
103 \fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB<\fIfilename\fB>\fR
104 Includes another test file if the named variable is not defined. The first form includes a file relative to the current test file, while the second form includes a file from the
105 .BR ipptool (8)
106 include directory.
107 .TP 5
108 \fBSKIP\-IF\-DEFINED \fIvariable-name\fR
109 .TP 5
110 \fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR
111 Specifies that the remainder of the test file should be skipped when the variable is or is not defined.
112 .TP 5
113 \fBSTOP\-AFTER\-INCLUDE\-ERROR no\fR
114 .TP 5
115 \fBSTOP\-AFTER\-INCLUDE\-ERROR yes\fR
116 Specifies whether tests will be stopped after an error in an included file.
117 .TP 5
118 \fBTRANSFER auto\fR
119 Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
120 .TP 5
121 \fBTRANSFER chunked\fR
122 Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying \fI\-c\fR on the
123 .BR ipptool (8)
124 command-line. Support for chunked requests is required for conformance with all versions of IPP.
125 .TP 5
126 \fBTRANSFER length\fR
127 Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying \fI\-l\fR on the
128 .BR ipptool (8)
129 command-line. Support for content length requests is required for conformance with all versions of IPP.
130 .TP 5
131 \fBVERSION 1.0\fR
132 .TP 5
133 \fBVERSION 1.1\fR
134 .TP 5
135 \fBVERSION 2.0\fR
136 .TP 5
137 \fBVERSION 2.1\fR
138 .TP 5
139 \fBVERSION 2.2\fR
140 Specifies the default IPP version number to use for the tests that follow.
141 .SS TEST DIRECTIVES
142 The following directives are understood within a \fItest\fR:
143 .TP 5
144 \fBATTR \fItag attribute-name value(s)\fR
145 Adds an attribute to the test request. Values are separated by the comma (",") character - escape commas using the "\" character. Common attributes and values are listed in the IANA IPP registry - see references below.
146 .TP 5
147 \fBATTR collection \fIattribute-name \fB{ MEMBER \fItag member-name value(s) ... \fB}\fR [ \fI... \fB,{ \fI... \fB} \fR]
148 Adds a collection attribute to the test request. Member attributes follow the same syntax as regular attributes and can themselves be nested collections. Multiple collection values can be supplied as needed, separated by commas.
149 .TP 5
150 \fBCOMPRESSION deflate\fR
151 .TP 5
152 \fBCOMPRESSION gzip\fR
153 .TP 5
154 \fBCOMPRESSION none\fR
155 Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request.
156 .TP 5
157 \fBDELAY \fIseconds\fR
158 Specifies a delay before this test will be run.
159 .TP 5
160 \fBDISPLAY \fIattribute-name\fR
161 Specifies that value of the named attribute should be output as part of the
162 test report.
163 .TP 5
164 \fBEXPECT \fIattribute-name \fR[ \fIpredicate(s) \fR]
165 .TP 5
166 \fBEXPECT ?\fIattribute-name predicate(s)\fR
167 .TP 5
168 \fBEXPECT !\fIattribute-name\fR
169 Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the "EXPECT PREDICATES" section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example "media\-col/media\-size/x\-dimension".
170 .TP 5
171 \fBFILE filename\fR
172 Specifies a file to include at the end of the request. This is typically used when sending a test print file.
173 .TP 5
174 \fBGROUP tag\fR
175 Specifies the group tag for subsequent attributes in the request.
176 .TP 5
177 \fBIGNORE\-ERRORS yes\fR
178 .TP 5
179 \fBIGNORE\-ERRORS no\fR
180 Specifies whether
181 .BR ipptool (8)
182 will ignore errors and continue with subsequent tests.
183 .TP 5
184 \fBNAME "\fIliteral string\fB"\fR
185 Specifies the human-readable name of the test.
186 .TP 5
187 \fBOPERATION \fIoperation-code\fR
188 Specifies the operation to be performed.
189 .TP 5
190 \fBREQUEST\-ID \fInumber\fR\fR
191 .TP 5
192 \fBREQUEST\-ID random\fR
193 Specifies the request-id value to use in the request, either an integer or the word "random" to use a randomly generated value (the default).
194 .TP 5
195 \fBRESOURCE \fIpath\fR
196 Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the
197 .BR ipptool (8)
198 program.
199 .TP 5
200 \fBSKIP\-IF\-DEFINED \fIvariable-name\fR
201 .TP 5
202 \fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR
203 Specifies that the current test should be skipped when the variable is or is not defined.
204 .TP 5
205 \fBSKIP\-PREVIOUS\-ERROR yes\fR
206 .TP 5
207 \fBSKIP\-PREVIOUS\-ERROR no\fR
208 Specifies whether
209 .BR ipptool (8)
210 will skip the current test if the previous test resulted in an error/failure.
211 .TP 5
212 \fBSTATUS \fIstatus-code \fR[ \fIpredicate\fR ]
213 Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates.
214 .TP 5
215 \fBTEST\-ID "\fIidentifier\fR"
216 Specifies an identifier string for the current test.
217 .TP 5
218 \fBTRANSFER auto\fR
219 Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise.
220 .TP 5
221 \fBTRANSFER chunked\fR
222 Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header.
223 .TP 5
224 \fBTRANSFER length\fR
225 Specifies that this test will use the HTTP/1.0 "Content-Length:" header.
226 .TP 5
227 \fBVERSION 1.0\fR
228 .TP 5
229 \fBVERSION 1.1\fR
230 .TP 5
231 \fBVERSION 2.0\fR
232 .TP 5
233 \fBVERSION 2.1\fR
234 .TP 5
235 \fBVERSION 2.2\fR
236 Specifies the IPP version number to use for this test.
237 .SS EXPECT PREDICATES
238 The following predicates are understood following the \fBEXPECT\fR test directive:
239 .TP 5
240 \fBCOUNT \fInumber\fR
241 Requires the \fBEXPECT\fR attribute to have the specified number of values.
242 .TP 5
243 \fBDEFINE\-MATCH \fIvariable-name\fR
244 Defines the variable to "1" when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test.
245 .TP 5
246 \fBDEFINE\-NO\-MATCH \fIvariable-name\fR
247 Defines the variable to "1" when the \fBEXPECT\fR condition does not match. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test.
248 .TP 5
249 \fBDEFINE\-VALUE \fIvariable-name\fR
250 Defines the variable to the value of the attribute when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test.
251 .TP 5
252 \fBIF\-DEFINED \fIvariable-name\fR
253 Makes the \fBEXPECT\fR conditions apply only if the specified variable is defined.
254 .TP 5
255 \fBIF\-NOT\-DEFINED \fIvariable-name\fR
256 Makes the \fBEXPECT\fR conditions apply only if the specified variable is not defined.
257 .TP 5
258 \fBIN\-GROUP \fItag\fR
259 Requires the \fBEXPECT\fR attribute to be in the specified group tag.
260 .TP 5
261 \fBOF\-TYPE \fItag[,tag,...]\fR
262 Requires the \fBEXPECT\fR attribute to use one of the specified value tag(s).
263 .TP 5
264 \fBREPEAT\-LIMIT \fInumber\fR
265 .br
266 Specifies the maximum number of times to repeat if the \fBREPEAT-MATCH\fR or \fBREPEAT-NO-MATCH\fR predicate is specified. The default value is 1000.
267 .TP 5
268 \fBREPEAT\-MATCH\fR
269 .TP 5
270 \fBREPEAT\-NO\-MATCH\fR
271 Specifies that the current test should be repeated when the \fBEXPECT\fR condition matches or does not match.
272 .TP 5
273 \fBSAME\-COUNT\-AS \fIattribute-name\fR
274 Requires the \fBEXPECT\fR attribute to have the same number of values as the specified parallel attribute.
275 .TP 5
276 \fBWITH\-ALL\-HOSTNAMES "\fIliteral string\fB"\fR
277 .TP 5
278 \fBWITH\-ALL\-HOSTNAMES "/\fIregular expression\fB/"\fR
279 Requires that all URI values contain a matching hostname.
280 .TP 5
281 \fBWITH\-ALL\-RESOURCES "\fIliteral string\fB"\fR
282 .TP 5
283 \fBWITH\-ALL\-RESOURCES "/\fIregular expression\fB/"\fR
284 Requires that all URI values contain a matching resource (including leading /).
285 .TP 5
286 \fBWITH\-ALL\-SCHEMES "\fIliteral string\fB"\fR
287 .TP 5
288 \fBWITH\-ALL-SCHEMES "/\fIregular expression\fB/"\fR
289 Requires that all URI values contain a matching scheme.
290 .TP 5
291 \fBWITH\-ALL\-VALUES "\fIliteral string\fB"\fR
292 Requires that all values of the \fBEXPECT\fR attribute match the literal string. Comparisons are case-sensitive.
293 .TP 5
294 \fBWITH\-ALL\-VALUES <\fInumber\fR
295 .TP 5
296 \fBWITH\-ALL\-VALUES =\fInumber\fR
297 .TP 5
298 \fBWITH\-ALL\-VALUES >\fInumber\fR
299 .TP 5
300 \fBWITH\-ALL\-VALUES \fInumber\fR[\fI,...,number\fR]
301 Requires that all values of the \fBEXPECT\fR attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
302 .TP 5
303 \fBWITH\-ALL\-VALUES "false"\fR
304 .TP 5
305 \fBWITH\-ALL\-VALUES "true"\fR
306 Requires that all values of the \fBEXPECT\fR attribute match the boolean value given.
307 .TP 5
308 \fBWITH\-ALL\-VALUES "/\fIregular expression\fB/"\fR
309 Requires that all values of the \fBEXPECT\fR attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
310 .TP 5
311 \fBWITH\-HOSTNAME "\fIliteral string\fB"\fR
312 .TP 5
313 \fBWITH\-HOSTNAME "/\fIregular expression\fB/"\fR
314 Requires that at least one URI value contains a matching hostname.
315 .TP 5
316 \fBWITH\-RESOURCE "\fIliteral string\fB"\fR
317 .TP 5
318 \fBWITH\-RESOURCE "/\fIregular expression\fB/"\fR
319 Requires that at least one URI value contains a matching resource (including leading /).
320 .TP 5
321 \fBWITH\-SCHEME "\fIliteral string\fB"\fR
322 .TP 5
323 \fBWITH\-SCHEME "/\fIregular expression\fB/"\fR
324 Requires that at least one URI value contains a matching scheme.
325 .TP 5
326 \fBWITH\-VALUE "\fIliteral string\fB"\fR
327 Requires that at least one value of the \fBEXPECT\fR attribute matches the literal string. Comparisons are case-sensitive.
328 .TP 5
329 \fBWITH\-VALUE <\fInumber\fR
330 .TP 5
331 \fBWITH\-VALUE =\fInumber\fR
332 .TP 5
333 \fBWITH\-VALUE >\fInumber\fR
334 .TP 5
335 \fBWITH\-VALUE \fInumber\fR[\fI,...,number\fR]
336 Requires that at least one value of the \fBEXPECT\fR attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
337 .TP 5
338 \fBWITH\-VALUE "false"\fR
339 .TP 5
340 \fBWITH\-VALUE "true"\fR
341 Requires that at least one value of the \fBEXPECT\fR attribute matches the boolean value given.
342 .TP 5
343 \fBWITH\-VALUE "/\fIregular expression\fB/"\fR
344 Requires that at least one value of the \fBEXPECT\fR attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
345 .SS STATUS PREDICATES
346 The following predicates are understood following the \fBSTATUS\fR test directive:
347 .TP 5
348 \fBDEFINE\-MATCH \fIvariable-name\fR
349 Defines the variable to "1" when the \fBSTATUS\fR matches. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test.
350 .TP 5
351 \fBDEFINE\-NO\-MATCH \fIvariable-name\fR
352 Defines the variable to "1" when the \fBSTATUS\fR does not match. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test.
353 .TP 5
354 \fBIF\-DEFINED \fIvariable-name\fR
355 Makes the \fBSTATUS\fR apply only if the specified variable is defined.
356 .TP 5
357 \fBIF\-NOT\-DEFINED \fIvariable-name\fR
358 Makes the \fBSTATUS\fR apply only if the specified variable is not defined.
359 .TP 5
360 \fBREPEAT\-LIMIT \fInumber\fR
361 .br
362 Specifies the maximum number of times to repeat. The default value is 1000.
363 .TP 5
364 \fBREPEAT\-MATCH\fR
365 .TP 5
366 \fBREPEAT\-NO\-MATCH\fR
367 Specifies that the current test should be repeated when the response status-code matches or does not match the value specified by the STATUS directive.
368 .SS OPERATION CODES
369 Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2911 and other IPP extension specifications. Here is a complete list of names supported by
370 .BR ipptool (8):
371 .nf
372
373 Activate\-Printer
374 CUPS\-Accept\-Jobs
375 CUPS\-Add\-Modify\-Class
376 CUPS\-Add\-Modify\-Printer
377 CUPS\-Authenticate\-Job
378 CUPS\-Delete\-Class
379 CUPS\-Delete\-Printer
380 CUPS\-Get\-Classes
381 CUPS\-Get\-Default
382 CUPS\-Get\-Devices
383 CUPS\-Get\-Document
384 CUPS\-Get\-PPD
385 CUPS\-Get\-PPDs
386 CUPS\-Get\-Printers
387 CUPS\-Move\-Job
388 CUPS\-Reject\-Jobs
389 CUPS\-Set\-Default
390 Cancel\-Current\-Job
391 Cancel\-Job
392 Cancel\-Jobs
393 Cancel\-My\-Jobs
394 Cancel\-Subscription
395 Close\-Job
396 Create\-Job
397 Create\-Job\-Subscriptions
398 Create\-Printer\-Subscriptions
399 Deactivate\-Printer
400 Disable\-Printer
401 Enable\-Printer
402 Get\-Job\-Attributes
403 Get\-Jobs
404 Get\-Notifications
405 Get\-Printer\-Attributes
406 Get\-Printer\-Support\-Files
407 Get\-Printer\-Supported\-Values
408 Get\-Subscription\-Attributes
409 Get\-Subscriptions
410 Hold\-Job
411 Hold\-New\-Jobs
412 Identify\-Printer
413 Pause\-Printer
414 Pause\-Printer\-After\-Current\-Job
415 Print\-Job
416 Print\-URI
417 Promote\-Job
418 Purge\-Jobs
419 Release\-Held\-New\-Jobs
420 Release\-Job
421 Renew\-Subscription
422 Reprocess\-Job
423 Restart\-Job
424 Restart\-Printer
425 Resubmit\-Job
426 Resume\-Job
427 Resume\-Printer
428 Schedule\-Job\-After
429 Send\-Document
430 Send\-Hardcopy\-Document
431 Send\-Notifications
432 Send\-URI
433 Set\-Job\-Attributes
434 Set\-Printer\-Attributes
435 Shutdown\-Printer
436 Startup\-Printer
437 Suspend\-Current\-Job
438 Validate\-Document
439 Validate\-Job
440 .fi
441 .SS STATUS CODES
442 Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2911 and other IPP extension specifications. Here is a complete list of the names supported by
443 .BR ipptool (8):
444 .nf
445
446 client\-error\-account\-authorization\-failed
447 client\-error\-account\-closed
448 client\-error\-account\-info\-needed
449 client\-error\-account\-limit\-reached
450 client\-error\-attributes\-not\-settable
451 client\-error\-attributes\-or\-values\-not\-supported
452 client\-error\-bad\-request
453 client\-error\-charset\-not\-supported
454 client\-error\-compression\-error
455 client\-error\-compression\-not\-supported
456 client\-error\-conflicting\-attributes
457 client\-error\-document\-access\-error
458 client\-error\-document\-format\-error
459 client\-error\-document\-format\-not\-supported
460 client\-error\-document\-password\-error
461 client\-error\-document\-permission\-error
462 client\-error\-document\-security\-error
463 client\-error\-document\-unprintable\-error
464 client\-error\-forbidden
465 client\-error\-gone
466 client\-error\-ignored\-all\-notifications
467 client\-error\-ignored\-all\-subscriptions
468 client\-error\-not\-authenticated
469 client\-error\-not\-authorized
470 client\-error\-not\-found
471 client\-error\-not\-possible
472 client\-error\-print\-support\-file\-not\-found
473 client\-error\-request\-entity\-too\-large
474 client\-error\-request\-value\-too\-long
475 client\-error\-timeout
476 client\-error\-too\-many\-subscriptions
477 client\-error\-uri\-scheme\-not\-supported
478 cups\-error\-account\-authorization\-failed
479 cups\-error\-account\-closed
480 cups\-error\-account\-info\-needed
481 cups\-error\-account\-limit\-reached
482 cups\-see\-other
483 redirection\-other\-site
484 server\-error\-busy
485 server\-error\-device\-error
486 server\-error\-internal\-error
487 server\-error\-job\-canceled
488 server\-error\-multiple\-document\-jobs\-not\-supported
489 server\-error\-not\-accepting\-jobs
490 server\-error\-operation\-not\-supported
491 server\-error\-printer\-is\-deactivated
492 server\-error\-service\-unavailable
493 server\-error\-temporary\-error
494 server\-error\-version\-not\-supported
495 successful\-ok
496 successful\-ok\-but\-cancel\-subscription
497 successful\-ok\-conflicting\-attributes
498 successful\-ok\-events\-complete
499 successful\-ok\-ignored\-notifications
500 successful\-ok\-ignored\-or\-substituted\-attributes
501 successful\-ok\-ignored\-subscriptions
502 successful\-ok\-too\-many\-events
503 .fi
504 .SS TAGS
505 Value and group tags correspond to the names from RFC 2911 and other IPP extension specifications. Here are the group tags:
506 .nf
507
508 document\-attributes\-tag
509 event\-notification\-attributes\-tag
510 job\-attributes\-tag
511 operation\-attributes\-tag
512 printer\-attributes\-tag
513 subscription\-attributes\-tag
514 unsupported\-attributes\-tag
515 .fi
516 .LP
517 Here are the value tags:
518 .nf
519
520 admin\-define
521 boolean
522 charset
523 collection
524 dateTime
525 default
526 delete\-attribute
527 enum
528 integer
529 keyword
530 mimeMediaType
531 nameWithLanguage
532 nameWithoutLanguage
533 naturalLanguage
534 no\-value
535 not\-settable
536 octetString
537 rangeOfInteger
538 resolution
539 textWithLanguage
540 textWithoutLanguage
541 unknown
542 unsupported
543 uri
544 uriScheme
545 .fi
546 .SS VARIABLES
547 The
548 .BR ipptool (8)
549 program maintains a list of variables that can be used in any literal string or attribute value by specifying "\fI$variable-name\fR". Aside from variables defined using the \fI-d\fR option or \fBDEFINE\fR directive, the following pre-defined variables are available:
550 .TP 5
551 \fB$$\fR
552 Inserts a single "$" character.
553 .TP 5
554 \fB$ENV[\fIname\fB]\fR
555 Inserts the value of the named environment variable, or an empty string if the environment variable is not defined.
556 .TP 5
557 \fB$filename\fR
558 Inserts the filename provided to
559 .BR ipptool (8)
560 with the \fI-f\fR option.
561 .TP 5
562 \fB$filetype\fR
563 Inserts the MIME media type for the filename provided to
564 .BR ipptool (8)
565 with the \fI-f\fR option.
566 .TP 5
567 \fB$hostname\fR
568 Inserts the hostname from the URI provided to
569 .BR ipptool (8).
570 .TP 5
571 \fB$job\-id\fR
572 Inserts the last "job\-id" attribute value returned in a test response or 0 if no "job\-id" attribute has been seen.
573 .TP 5
574 \fB$job\-uri\fR
575 Inserts the last "job\-uri" attribute value returned in a test response or an empty string if no "job\-uri" attribute has been seen.
576 .TP 5
577 \fB$notify\-subscription\-id\fR
578 Inserts the last "notify\-subscription\-id" attribute value returned in a test response or 0 if no "notify\-subscription\-id" attribute has been seen.
579 .TP 5
580 \fB$port\fR
581 Inserts the port number from the URI provided to
582 .BR ipptool (8).
583 .TP 5
584 \fB$resource\fR
585 Inserts the resource path from the URI provided to
586 .BR ipptool (8).
587 .TP 5
588 \fB$scheme\fR
589 Inserts the scheme from the URI provided to
590 .BR ipptool (8).
591 .TP 5
592 \fB$uri\fR
593 Inserts the URI provided to
594 .BR ipptool (8).
595 .TP 5
596 \fB$uriuser\fR
597 Inserts the username from the URI provided to
598 .BR ipptool (8),
599 if any.
600 .TP 5
601 \fB$user\fR
602 Inserts the current user's login name.
603 .SH SEE ALSO
604 .BR ipptool (1),
605 CUPS Online Help (http://localhost:631/help),
606 IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations),
607 PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp),
608 RFC 2911 (http://tools.ietf.org/html/rfc3911)
609 .SH COPYRIGHT
610 Copyright \[co] 2007-2014 by Apple Inc.
611 .\"
612 .\" End of "$Id$".
613 .\"