If \fI\-\-exec\fR, \fI\-l\fR, \fI\-\-ls\fR, \fI\-p\fR, \fI\-\-print\fR, \fI\-\-print\-name\fR, \fI\-q\fR, \fI\-\-quiet\fR, \fI\-s\fR, or \fI\-x\fR is not specified, \fBippfind\fR adds \fI\-\-print\fR to print the service URI of anything it finds.
The following expressions are supported:
.TP5
\fB\-d \fIregex\fR
.TP5
\fB\-\-domain \fIregex\fR
True if the domain matches the given regular expression.
.TP5
.B\-\-false
Always false.
.TP5
\fB\-h \fIregex\fR
.TP5
\fB\-\-host \fIregex\fR
True is the hostname matches the given regular expression.
.TP5
.B\-l
.TP5
.B\-\-ls
Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional \fIfind\fR "-ls" output for HTTP URLs.
The result is true if the URI is accessible, false otherwise.
.TP5
.B\-\-local
True if the service is local to this computer.
.TP5
\fB\-N \fIname\fR
.TP5
\fB\-\-literal\-name \fIname\fR
True if the service instance name matches the given name.
.TP5
\fB\-n \fIregex\fR
.TP5
\fB\-\-name \fIregex\fR
True if the service instance name matches the given regular expression.
.TP5
\fB\-\-path \fIregex\fR
True if the URI resource path matches the given regular expression.
.TP5
\fB\-P \fInumber\fR[\fB-\fInumber\fR]
.TP5
\fB\-\-port \fInumber\fR[\fB-\fInumber\fR]
True if the port matches the given number or range.
.TP5
.B\-p
.TP5
.B\-\-print
Prints the URI if the result of previous expressions is true.
The result is always true.
.TP5
.B\-q
.TP5
.B\-\-quiet
Quiet mode - just returns the exit codes below.
.TP5
.B\-r
.TP5
.B\-\-remote
True if the service is not local to this computer.
.TP5
.B\-s
.TP5
.B\-\-print\-name
Prints the service instance name if the result of previous expressions is true.
The result is always true.
.TP5
.B\-\-true
Always true.
.TP5
\fB\-t \fIkey\fR
.TP5
\fB\-\-txt \fIkey\fR
True if the TXT record contains the named key.
.TP5
\fB\-\-txt\-\fIkey regex\fR
True if the TXT record contains the named key and matches the given regular expression.
.TP5
\fB\-u \fIregex\fR
.TP5
\fB\-\-uri \fIregex\fR
True if the URI matches the given regular expression.
Executes the specified program if the current result is true.
"{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
.PP
Expressions may also contain modifiers:
.TP5
\fB( \fIexpression \fB)\fR
Group the result of expressions.
.TP5
\fB! \fIexpression\fR
.TP5
\fB\-\-not \fIexpression\fR
Unary NOT of the expression.
.TP5
\fIexpression expression\fR
.TP5
\fIexpression \fB\-\-and \fIexpression\fR
Logical AND of expressions.
.TP5
\fIexpression \fB\-\-or \fIexpression\fR
Logical OR of expressions.
.SSSUBSTITUTIONS
The substitutions for "{foo}" in \fI\-e\fR and \fI\-\-exec\fR are:
.TP5
.B{service_domain}
Domain name, e.g., "example.com.", "local.", etc.
.TP5
.B{service_hostname}
Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
.TP5
.B{service_name}
Service instance name, e.g., "My Fine Printer".
.TP5
.B{service_port}
Port number for server, typically 631 for IPP and 80 for HTTP.
.TP5
.B{service_regtype}
DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
.TP5
.B{service_scheme}
URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
.TP5
.B{}
.TP5
.B{service_uri}
URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
.TP5
\fB{txt_\fIkey\fB}\fR
Value of TXT record \fIkey\fR (lowercase).
.SHOPTIONS
\fBippfind\fR supports the following options:
.TP5
.B\-\-help
Show program help.
.TP5
.B\-\-version
Show program version.
.TP5
.B\-4
Use IPv4 when listing.
.TP5
.B\-6
Use IPv6 when listing.
.TP5
\fB\-T \fIseconds\fR
Specify find timeout in seconds.
If 1 or less, \fBippfind\fR stops as soon as it thinks it has found everything.
The default timeout is 1 second.
.TP5
\fB\-V \fIversion\fR
Specifies the IPP version when listing.
Supported values are "1.1", "2.0", "2.1", and "2.2".
.SHEXITSTATUS
\fBippfind\fR returns 0 if the result for all processed expressions is true, 1 if the result of any processed expression is false, 2 if browsing or any query or resolution failed, 3 if an undefined option or invalid expression was specified, and 4 if it ran out of memory.
.SHENVIRONMENT
When executing a program, \fBippfind\fR sets the following environment variables for the matching service registration:
.TP5
.BIPPFIND_SERVICE_DOMAIN
Domain name, e.g., "example.com.", "local.", etc.
.TP5
.BIPPFIND_SERVICE_HOSTNAME
Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
.TP5
.BIPPFIND_SERVICE_NAME
Service instance name, e.g., "My Fine Printer".
.TP5
.BIPPFIND_SERVICE_PORT
Port number for server, typically 631 for IPP and 80 for HTTP.
.TP5
.BIPPFIND_SERVICE_REGTYPE
DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
.TP5
.BIPPFIND_SERVICE_SCHEME
URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
.TP5
.BIPPFIND_SERVICE_URI
URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
.TP5
.BIPPFIND_TXT_\fIKEY\fR
Values of TXT record \fIKEY\fR (uppercase).
.SHEXAMPLES
To show the status of all registered IPP printers on your network, run:
.nf
ippfind \-\-ls
.fi
Similarly, to send a PostScript test page to every PostScript printer, run: