diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2022-06-09 10:22:37 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2022-06-09 10:22:37 +0000 |
commit | 8d3e4e8c12984565ca30fe58c4612c8a85bc4d43 (patch) | |
tree | dcdeb079a2de753b2e8ba1be0927df435b211494 /doc/s6-test.html | |
parent | 6910ea0e98ca11275c006d609d432e47c321054d (diff) | |
download | s6-portable-utils-8d3e4e8c12984565ca30fe58c4612c8a85bc4d43.tar.xz |
Add =~ operator to s6-test
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc/s6-test.html')
-rw-r--r-- | doc/s6-test.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/s6-test.html b/doc/s6-test.html index 3764a5c..a8424cd 100644 --- a/doc/s6-test.html +++ b/doc/s6-test.html @@ -41,6 +41,16 @@ disambiguation technique that has unfortunately not been chosen by the standard. s6-test accepts an arbitrary number of arguments. </p> +<h2> Exit codes </h2> + +<ul> + <li> 0: the test is true </li> + <li> 1: the test is false </li> + <li> 100: wrong usage </li> + <li> 101: internal error (should never happen, warrants a bug-report) </li> + <li> 111: system call failure </li> +</ul> + <h2> Posixness </h2> <p> @@ -55,6 +65,11 @@ exact same behaviour. <ul> <li> <tt>-v <em>VAR</em></tt> : tests whether the <em>VAR</em> variable is defined in the current environment. </li> + <li> <tt><em>string</em> =~ <em>pattern</em></tt> : +tries to match <em>string</em> against extended regular expression +<em>pattern</em>. True if any part of <em>string</em> matches <em>pattern</em>; +in order to match whole strings, you must anchor <em>pattern</em> with +<tt>^</tt> and <tt>$</tt> markers. </li> </ul> </body> |