public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: tools-reference/bash/
Date: Fri, 27 May 2022 09:02:50 +0000 (UTC)	[thread overview]
Message-ID: <1653642095.3a69349de3d0c6ddc7eb27afd20f3416ece67ad1.ulm@gentoo> (raw)

commit:     3a69349de3d0c6ddc7eb27afd20f3416ece67ad1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 09:49:35 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri May 27 09:01:35 2022 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3a69349d

tools-reference/bash: More compact table formatting in source code

No change of text.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 tools-reference/bash/text.xml | 796 ++++++++++++++----------------------------
 1 file changed, 270 insertions(+), 526 deletions(-)

diff --git a/tools-reference/bash/text.xml b/tools-reference/bash/text.xml
index ee1d7e3..0a7c33f 100644
--- a/tools-reference/bash/text.xml
+++ b/tools-reference/bash/text.xml
@@ -153,54 +153,30 @@ following are available:
 </p>
 
 <table>
-  <tr>
-    <th>
-      Operator
-    </th>
-    <th>
-      Purpose
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>==</c> (also <c>=</c>)
-    </ti>
-    <ti>
-      String equality
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>!=</c>
-    </ti>
-    <ti>
-      String inequality
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>&lt;</c>
-    </ti>
-    <ti>
-      String lexiographic comparison (before)
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>&gt;</c>
-    </ti>
-    <ti>
-      String lexiographic comparison (after)
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>=~</c>
-    </ti>
-    <ti>
-      String regular expression match
-    </ti>
-  </tr>
+<tr>
+  <th>Operator</th>
+  <th>Purpose</th>
+</tr>
+<tr>
+  <ti><c>==</c> (also <c>=</c>)</ti>
+  <ti>String equality</ti>
+</tr>
+<tr>
+  <ti><c>!=</c></ti>
+  <ti>String inequality</ti>
+</tr>
+<tr>
+  <ti><c>&lt;</c></ti>
+  <ti>String lexiographic comparison (before)</ti>
+</tr>
+<tr>
+  <ti><c>&gt;</c></ti>
+  <ti>String lexiographic comparison (after)</ti>
+</tr>
+<tr>
+  <ti><c>=~</c></ti>
+  <ti>String regular expression match</ti>
+</tr>
 </table>
 
 </body>
@@ -216,30 +192,18 @@ available:
 </p>
 
 <table>
-  <tr>
-    <th>
-      Operator
-    </th>
-    <th>
-      Purpose
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>-z "string"</c>
-    </ti>
-    <ti>
-      String has zero length
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-n "string"</c>
-    </ti>
-    <ti>
-      String has non-zero length
-    </ti>
-  </tr>
+<tr>
+  <th>Operator</th>
+  <th>Purpose</th>
+</tr>
+<tr>
+  <ti><c>-z "string"</c></ti>
+  <ti>String has zero length</ti>
+</tr>
+<tr>
+  <ti><c>-n "string"</c></ti>
+  <ti>String has non-zero length</ti>
+</tr>
 </table>
 
 </body>
@@ -255,62 +219,34 @@ following are available:
 </p>
 
 <table>
-  <tr>
-    <th>
-      Operator
-    </th>
-    <th>
-      Purpose
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>-eq</c>
-    </ti>
-    <ti>
-      Integer equality
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-ne</c>
-    </ti>
-    <ti>
-      Integer inequality
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-lt</c>
-    </ti>
-    <ti>
-      Integer less than
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-le</c>
-    </ti>
-    <ti>
-      Integer less than or equal to
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-gt</c>
-    </ti>
-    <ti>
-      Integer greater than
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-ge</c>
-    </ti>
-    <ti>
-      Integer greater than or equal to
-    </ti>
-  </tr>
+<tr>
+  <th>Operator</th>
+  <th>Purpose</th>
+</tr>
+<tr>
+  <ti><c>-eq</c></ti>
+  <ti>Integer equality</ti>
+</tr>
+<tr>
+  <ti><c>-ne</c></ti>
+  <ti>Integer inequality</ti>
+</tr>
+<tr>
+  <ti><c>-lt</c></ti>
+  <ti>Integer less than</ti>
+</tr>
+<tr>
+  <ti><c>-le</c></ti>
+  <ti>Integer less than or equal to</ti>
+</tr>
+<tr>
+  <ti><c>-gt</c></ti>
+  <ti>Integer greater than</ti>
+</tr>
+<tr>
+  <ti><c>-ge</c></ti>
+  <ti>Integer greater than or equal to</ti>
+</tr>
 </table>
 
 </body>
@@ -326,182 +262,94 @@ available (lifted from <c>man bash</c>):
 </p>
 
 <table>
-  <tr>
-    <th>
-      Operator
-    </th>
-    <th>
-      Purpose
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>-a file</c>
-    </ti>
-    <ti>
-      Exists (use <c>-e</c> instead)
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-b file</c>
-    </ti>
-    <ti>
-      Exists and is a block special file
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-c file</c>
-    </ti>
-    <ti>
-      Exists and is a character special file
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-d file</c>
-    </ti>
-    <ti>
-      Exists and is a directory
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-e file</c>
-    </ti>
-    <ti>
-      Exists
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-f file</c>
-    </ti>
-    <ti>
-      Exists and is a regular file
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-g file</c>
-    </ti>
-    <ti>
-      Exists and is set-group-id
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-h file</c>
-    </ti>
-    <ti>
-      Exists and is a symbolic link
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-k file</c>
-    </ti>
-    <ti>
-      Exists and its sticky bit is set
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-p file</c>
-    </ti>
-    <ti>
-      Exists and is a named pipe (FIFO)
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-r file</c>
-    </ti>
-    <ti>
-      Exists and is readable
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-s file</c>
-    </ti>
-    <ti>
-      Exists and has a size greater than zero
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-t fd</c>
-    </ti>
-    <ti>
-      Descriptor fd is open and refers to a terminal
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-u file</c>
-    </ti>
-    <ti>
-      Exists and its set-user-id bit is set
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-w file</c>
-    </ti>
-    <ti>
-      Exists and is writable
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-x file</c>
-    </ti>
-    <ti>
-      Exists and is executable
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-O file</c>
-    </ti>
-    <ti>
-      Exists and is owned by the effective user id
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-G file</c>
-    </ti>
-    <ti>
-      Exists and is owned by the effective group id
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-L file</c>
-    </ti>
-    <ti>
-      Exists and is a symbolic link
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-S file</c>
-    </ti>
-    <ti>
-      Exists and is a socket
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-N file</c>
-    </ti>
-    <ti>
-      Exists and has been modified since it was last read
-    </ti>
-  </tr>
+<tr>
+  <th>Operator</th>
+  <th>Purpose</th>
+</tr>
+<tr>
+  <ti><c>-a file</c></ti>
+  <ti>Exists (use <c>-e</c> instead)</ti>
+</tr>
+<tr>
+  <ti><c>-b file</c></ti>
+  <ti>Exists and is a block special file</ti>
+</tr>
+<tr>
+  <ti><c>-c file</c></ti>
+  <ti>Exists and is a character special file</ti>
+</tr>
+<tr>
+  <ti><c>-d file</c></ti>
+  <ti>Exists and is a directory</ti>
+</tr>
+<tr>
+  <ti><c>-e file</c></ti>
+  <ti>Exists</ti>
+</tr>
+<tr>
+  <ti><c>-f file</c></ti>
+  <ti>Exists and is a regular file</ti>
+</tr>
+<tr>
+  <ti><c>-g file</c></ti>
+  <ti>Exists and is set-group-id</ti>
+</tr>
+<tr>
+  <ti><c>-h file</c></ti>
+  <ti>Exists and is a symbolic link</ti>
+</tr>
+<tr>
+  <ti><c>-k file</c></ti>
+  <ti>Exists and its sticky bit is set</ti>
+</tr>
+<tr>
+  <ti><c>-p file</c></ti>
+  <ti>Exists and is a named pipe (FIFO)</ti>
+</tr>
+<tr>
+  <ti><c>-r file</c></ti>
+  <ti>Exists and is readable</ti>
+</tr>
+<tr>
+  <ti><c>-s file</c></ti>
+  <ti>Exists and has a size greater than zero</ti>
+</tr>
+<tr>
+  <ti><c>-t fd</c></ti>
+  <ti>Descriptor fd is open and refers to a terminal</ti>
+</tr>
+<tr>
+  <ti><c>-u file</c></ti>
+  <ti>Exists and its set-user-id bit is set</ti>
+</tr>
+<tr>
+  <ti><c>-w file</c></ti>
+  <ti>Exists and is writable</ti>
+</tr>
+<tr>
+  <ti><c>-x file</c></ti>
+  <ti>Exists and is executable</ti>
+</tr>
+<tr>
+  <ti><c>-O file</c></ti>
+  <ti>Exists and is owned by the effective user id</ti>
+</tr>
+<tr>
+  <ti><c>-G file</c></ti>
+  <ti>Exists and is owned by the effective group id</ti>
+</tr>
+<tr>
+  <ti><c>-L file</c></ti>
+  <ti>Exists and is a symbolic link</ti>
+</tr>
+<tr>
+  <ti><c>-S file</c></ti>
+  <ti>Exists and is a socket</ti>
+</tr>
+<tr>
+  <ti><c>-N file</c></ti>
+  <ti>Exists and has been modified since it was last read</ti>
+</tr>
 </table>
 
 </body>
@@ -517,41 +365,25 @@ following are available (lifted from <c>man bash</c>):
 </p>
 
 <table>
-  <tr>
-    <th>
-      Operator
-    </th>
-    <th>
-      Purpose
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>file1 -nt file2</c>
-    </ti>
-    <ti>
-      file1 is newer (according to modification date) than
-      file2, or if file1 exists and file2 does not.
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>file1 -ot file2</c>
-    </ti>
-    <ti>
-      file1 is older than file2, or if file2 exists and
-      file1 does not.
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>file1 -ef file2</c>
-    </ti>
-    <ti>
-      file1 and file2 refer to the same device and inode
-      numbers.
-    </ti>
-  </tr>
+<tr>
+  <th>Operator</th>
+  <th>Purpose</th>
+</tr>
+<tr>
+  <ti><c>file1 -nt file2</c></ti>
+  <ti>
+    file1 is newer (according to modification date) than file2,
+    or if file1 exists and file2 does not.
+  </ti>
+</tr>
+<tr>
+  <ti><c>file1 -ot file2</c></ti>
+  <ti>file1 is older than file2, or if file2 exists and file1 does not.</ti>
+</tr>
+<tr>
+  <ti><c>file1 -ef file2</c></ti>
+  <ti>file1 and file2 refer to the same device and inode numbers.</ti>
+</tr>
 </table>
 
 </body>
@@ -568,39 +400,23 @@ These are used <e>outside</e> of the <c>[[ ]]</c> blocks. For operator precedenc
 </p>
 
 <table>
-  <tr>
-    <th>
-      Construct
-    </th>
-    <th>
-      Effect
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>first || second</c>
-    </ti>
-    <ti>
-      first <e>or</e> second (short circuit)
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>
-        first &amp;&amp; second</c>
-    </ti>
-    <ti>
-      first <e>and</e> second (short circuit)
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>! condition</c>
-    </ti>
-    <ti>
-      <e>not</e> condition
-    </ti>
-  </tr>
+<tr>
+  <th>Construct</th>
+  <th>Effect</th>
+</tr>
+<tr>
+  <ti><c>first || second</c></ti>
+  <ti>first <e>or</e> second (short circuit)</ti>
+</tr>
+<tr>
+  <ti><c>
+first &amp;&amp; second</c></ti>
+  <ti>first <e>and</e> second (short circuit)</ti>
+</tr>
+<tr>
+  <ti><c>! condition</c></ti>
+  <ti><e>not</e> condition</ti>
+</tr>
 </table>
 
 
@@ -878,160 +694,88 @@ operators are supported (the table is in order of precedence, highest first):
 </p>
 
 <table>
-  <tr>
-    <th>
-      Operators
-    </th>
-    <th>
-      Effect
-    </th>
-  </tr>
-  <tr>
-    <ti>
-      <c>var++</c>, <c>var--</c>
-    </ti>
-    <ti>
-      Variable post-increment, post-decrement
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>++var</c>, <c>--var</c>
-    </ti>
-    <ti>
-      Variable pre-increment, pre-decrement
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>-</c>, <c>+</c>
-    </ti>
-    <ti>
-      Unary minus and plus
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>!</c>, <c>~</c>
-    </ti>
-    <ti>
-      Logical negation, bitwise negation
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>**</c>
-    </ti>
-    <ti>
-      Exponentiation
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>*</c>, <c>/</c>, <c>%</c>
-    </ti>
-    <ti>
-      Multiplication, division, remainder
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>+</c>, <c>-</c>
-    </ti>
-    <ti>
-      Addition, subtraction
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>&lt;&lt;</c>, <c>&gt;&gt;</c>
-    </ti>
-    <ti>
-      Left, right bitwise shifts
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>&lt;=</c>, <c>&gt;=</c>, <c>&lt;</c>, <c>&gt;</c>
-    </ti>
-    <ti>
-      Comparison: less than or equal to, greater than or
-      equal to, strictly less than, strictly greater than
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>==</c>, <c>!=</c>
-    </ti>
-    <ti>
-      Equality, inequality
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>&amp;</c>
-    </ti>
-    <ti>
-      Bitwise AND
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>^</c>
-    </ti>
-    <ti>
-      Bitwise exclusive OR
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>|</c>
-    </ti>
-    <ti>
-      Bitwise OR
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>&amp;&amp;</c>
-    </ti>
-    <ti>
-      Logical AND
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>||</c>
-    </ti>
-    <ti>
-      Logical OR
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>expr ? expr : expr</c>
-    </ti>
-    <ti>
-      Conditional operator
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>=</c>, <c>*=</c>, <c>/=</c>, <c>%=</c>, <c>+=</c>, <c>-=</c>, <c>&lt;&lt;=</c>,
-      <c>&gt;&gt;=</c>, <c>&amp;=</c>, <c>^=</c>, <c>|=</c>
-    </ti>
-    <ti>
-      Assignment
-    </ti>
-  </tr>
-  <tr>
-    <ti>
-      <c>expr1 , expr2</c>
-    </ti>
-    <ti>
-      Multiple statements
-    </ti>
-  </tr>
+<tr>
+  <th>Operators</th>
+  <th>Effect</th>
+</tr>
+<tr>
+  <ti><c>var++</c>, <c>var--</c></ti>
+  <ti>Variable post-increment, post-decrement</ti>
+</tr>
+<tr>
+  <ti><c>++var</c>, <c>--var</c></ti>
+  <ti>Variable pre-increment, pre-decrement</ti>
+</tr>
+<tr>
+  <ti><c>-</c>, <c>+</c></ti>
+  <ti>Unary minus and plus</ti>
+</tr>
+<tr>
+  <ti><c>!</c>, <c>~</c></ti>
+  <ti>Logical negation, bitwise negation</ti>
+</tr>
+<tr>
+  <ti><c>**</c></ti>
+  <ti>Exponentiation</ti>
+</tr>
+<tr>
+  <ti><c>*</c>, <c>/</c>, <c>%</c></ti>
+  <ti>Multiplication, division, remainder</ti>
+</tr>
+<tr>
+  <ti><c>+</c>, <c>-</c></ti>
+  <ti>Addition, subtraction</ti>
+</tr>
+<tr>
+  <ti><c>&lt;&lt;</c>, <c>&gt;&gt;</c></ti>
+  <ti>Left, right bitwise shifts</ti>
+</tr>
+<tr>
+  <ti><c>&lt;=</c>, <c>&gt;=</c>, <c>&lt;</c>, <c>&gt;</c></ti>
+  <ti>
+    Comparison: less than or equal to, greater than or equal to,
+    strictly less than, strictly greater than
+  </ti>
+</tr>
+<tr>
+  <ti><c>==</c>, <c>!=</c></ti>
+  <ti>Equality, inequality</ti>
+</tr>
+<tr>
+  <ti><c>&amp;</c></ti>
+  <ti>Bitwise AND</ti>
+</tr>
+<tr>
+  <ti><c>^</c></ti>
+  <ti>Bitwise exclusive OR</ti>
+</tr>
+<tr>
+  <ti><c>|</c></ti>
+  <ti>Bitwise OR</ti>
+</tr>
+<tr>
+  <ti><c>&amp;&amp;</c></ti>
+  <ti>Logical AND</ti>
+</tr>
+<tr>
+  <ti><c>||</c></ti>
+  <ti>Logical OR</ti>
+</tr>
+<tr>
+  <ti><c>expr ? expr : expr</c></ti>
+  <ti>Conditional operator</ti>
+</tr>
+<tr>
+  <ti>
+    <c>=</c>, <c>*=</c>, <c>/=</c>, <c>%=</c>, <c>+=</c>, <c>-=</c>,
+    <c>&lt;&lt;=</c>, <c>&gt;&gt;=</c>, <c>&amp;=</c>, <c>^=</c>, <c>|=</c>
+  </ti>
+  <ti>Assignment</ti>
+</tr>
+<tr>
+  <ti><c>expr1 , expr2</c></ti>
+  <ti>Multiple statements</ti>
+</tr>
 </table>
 
 <note>


             reply	other threads:[~2022-05-27  9:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  9:02 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-10 17:15 [gentoo-commits] proj/devmanual:master commit in: tools-reference/bash/ Ulrich Müller
2022-05-27  9:02 Ulrich Müller
2022-05-27  9:02 Ulrich Müller
2022-05-27  9:02 Ulrich Müller
2022-05-27  9:02 Ulrich Müller
2021-03-21  5:48 Ulrich Müller
2021-03-12 22:03 Ulrich Müller
2021-03-12 22:03 Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1653642095.3a69349de3d0c6ddc7eb27afd20f3416ece67ad1.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox