From 2e5dbdf8d3dc349d853d51044eb78c11dee92ce5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 19 Sep 2019 11:56:39 +0300 Subject: [PATCH] docs: update --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/README.md b/README.md index eb11821..3813673 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ A collection of pure POSIX `sh` alternatives to external processes +**NOTE**: If anything seen here is **not** POSIX `sh`, open an issue. This is a living document that is open to change and improvement. + + ## Table of Contents @@ -35,6 +38,12 @@ A collection of pure POSIX `sh` alternatives to external processes * [File Conditionals](#file-conditionals) * [Variable Conditionals](#variable-conditionals) * [Variable Comparisons](#variable-comparisons) +* [ARITHMETIC OPERATORS](#arithmetic-operators) + * [Assignment](#assignment) + * [Arithmetic](#arithmetic) + * [Bitwise](#bitwise) + * [Logical](#logical) + * [Miscellaneous](#miscellaneous) @@ -442,3 +451,58 @@ For use in `[ ]` `if [ ]; then` and `test`. | `var -lt var2` | Less than (*algebraically*). | `var -le var2` | Less than or equal to (*algebraically*). + +# ARITHMETIC OPERATORS + +## Assignment + +| Operators | What does it do? | +| --------- | ---------------- | +| `=` | Initialize or change the value of a variable. + +## Arithmetic + +| Operators | What does it do? | +| --------- | ---------------- | +| `+` | Addition +| `-` | Subtraction +| `*` | Multiplication +| `/` | Division +| `**` | Exponentiation +| `%` | Modulo +| `+=` | Plus-Equal (*Increment a variable.*) +| `-=` | Minus-Equal (*Decrement a variable.*) +| `*=` | Times-Equal (*Multiply a variable.*) +| `/=` | Slash-Equal (*Divide a variable.*) +| `%=` | Mod-Equal (*Remainder of dividing a variable.*) + +## Bitwise + +| Operators | What does it do? | +| --------- | ---------------- | +| `<<` | Bitwise Left Shift +| `<<=` | Left-Shift-Equal +| `>>` | Bitwise Right Shift +| `>>=` | Right-Shift-Equal +| `&` | Bitwise AND +| `&=` | Bitwise AND-Equal +| `\|` | Bitwise OR +| `\|=` | Bitwise OR-Equal +| `~` | Bitwise NOT +| `^` | Bitwise XOR +| `^=` | Bitwise XOR-Equal + +## Logical + +| Operators | What does it do? | +| --------- | ---------------- | +| `!` | NOT +| `&&` | AND +| `\|\|` | OR + +## Miscellaneous + +| Operators | What does it do? | Example | +| --------- | ---------------- | ------- | +| `,` | Comma Separator | `((a=1,b=2,c=3))` +