| FEATURE-CHECK(1) | General Commands Manual | FEATURE-CHECK(1) |
feature-check —
query a program for supported features
feature-check |
[-v] [-O
optname] [-P
prefix] program
feature-name |
feature-check |
[-O optname]
[-P prefix]
program feature-name
op version |
feature-check |
[-O optname]
[-o json|tsv]
[-P prefix]
-l program |
feature-check |
-V | -h |
feature-check |
--features |
The feature-check tool obtains the list of
supported features from a program via various methods (e.g. running it with
the --features command-line option) and allows other
programs to check for the presence and, possibly, versions of specific
features.
Options:
--featuresfeature-check:
feature-checkfeature-check tool.listfeature-check tool supports
fetching the list of features supported by a program.simplefeature-check tool supports
comparing the version of a single feature against a specified version
string.singlefeature-check tool supports
querying a single feature.-h,
--help-O
optname--features).-o
format-l option.-P
prefixfeature-check should look
for in the program's output to find the line that contains the list of
features; default "Features: ".-V,
--version-vWhen querying a single feature,
feature-check will exit with code 0 if the program
supports that feature, and with a non-zero code when either the program
could not be executed, or its list of features could not be parsed, or the
feature was not present.
When examining the version of a single feature,
feature-check will exit with code 0 if the
comparison result is true, and with a non-zero code when either the program
could not be executed, or its list of features could not be parsed, or the
comparison failed.
When listing the features supported by a program,
feature-check will exit with code 0 when the list of
features was obtained and output, and with a non-zero code when either the
program could not be executed or its list of features could not be
parsed.
The following examples are shown as given to the shell:
feature-check curl
AsynchDNSExit with code 0 if the curl(1) tool is present and it supports asynchronous DNS lookups.
feature-check -l confgetList the features supported by the confget(1) tool.
feature-check timelimit 'timelimit ge
1.9'Exit with code 0 if the timelimit(1) tool
advertises its timelimit feature at version 1.9 or
later.
feature-check timelimit timelimit ge
1.9The same check; note that the
feature-check tool will treat all the arguments
after the program name as a single expression, i.e. it will concatenate them
into a single string separated by spaces and then interpret the string.
No standards documentation was harmed in the process of creating
feature-check.
Please report any bugs in feature-check to
the author.
The feature-check utility was written by
Peter Pentchev ⟨roam@ringlet.net⟩ in
2018.
| April 21, 2018 | Debian |