> For the complete documentation index, see [llms.txt](https://www.shellspells.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.shellspells.net/windows/file-ops/operators.md).

# Operators

## <mark style="color:red;">Comparison Operators</mark>

<table data-header-hidden><thead><tr><th width="188">Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>-lt</code></mark></td><td>Less than</td></tr><tr><td><mark style="color:yellow;"><code>-clt</code></mark></td><td>Casesensitive less than (For string comparisons)</td></tr><tr><td><mark style="color:yellow;"><code>-le</code></mark></td><td>Less than or equal to</td></tr><tr><td><mark style="color:yellow;"><code>-cle</code></mark></td><td>Casesensitive less than or equal to (For string comparisons)</td></tr><tr><td><mark style="color:yellow;"><code>-gt</code></mark></td><td>Greater than</td></tr><tr><td><mark style="color:yellow;"><code>-ge</code></mark></td><td>Greater than or equal to</td></tr><tr><td><mark style="color:yellow;"><code>-eq</code></mark></td><td>Equal to</td></tr><tr><td><mark style="color:yellow;"><code>-ceq</code></mark></td><td>Case-sensitive equal to (For string comparisons)</td></tr><tr><td><mark style="color:yellow;"><code>-ne</code></mark></td><td>Not equal to</td></tr><tr><td><mark style="color:yellow;"><code>-cne</code></mark></td><td>Casesensitive not equal to (For string comparisons)</td></tr><tr><td><mark style="color:yellow;"><code>-like</code></mark></td><td>Like (uses wildcard for pattern matching)</td></tr><tr><td><mark style="color:yellow;"><code>-match</code></mark></td><td>A match using Regular Expressions</td></tr><tr><td><mark style="color:yellow;"><code>-contains</code></mark></td><td>Returns true if it contains the object</td></tr><tr><td><mark style="color:yellow;"><code>-NotContains</code></mark></td><td>Inverse of <mark style="color:yellow;"><code>-contains</code></mark></td></tr><tr><td><mark style="color:yellow;"><code>-in</code></mark></td><td>Returns True if object is in specified collection</td></tr><tr><td><mark style="color:yellow;"><code>-notin</code></mark></td><td>Inverse of <mark style="color:yellow;"><code>-in</code></mark></td></tr></tbody></table>

## <mark style="color:red;">Logical Operators</mark>

<table data-header-hidden><thead><tr><th width="110">Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>-not</code></mark></td><td>Reverses True and False (the ! symbol is an alias for this operator).</td></tr><tr><td><mark style="color:yellow;"><code>-and</code></mark></td><td>Both subexpressions must be True for the entire expression to be True.</td></tr><tr><td><mark style="color:yellow;"><code>-or</code></mark></td><td>Either subexpression can be True for the entire expression to be True.</td></tr></tbody></table>

## <mark style="color:red;">Function Operators</mark>

<table data-header-hidden><thead><tr><th width="142">Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>-join</code></mark></td><td>Joins the elements of an array into a delimited string.</td></tr><tr><td><mark style="color:yellow;"><code>-split</code></mark></td><td>Splits a delimited string into an array.</td></tr><tr><td><mark style="color:yellow;"><code>-replace</code></mark></td><td>Replaces occurrences of one string with another.</td></tr><tr><td><mark style="color:yellow;"><code>-is</code></mark></td><td>Returns True if an item is of the specified type ($one -is [int]).</td></tr><tr><td><mark style="color:yellow;"><code>-as</code></mark></td><td>Casts the item as the specified type ($one -as [int]).</td></tr><tr><td><mark style="color:yellow;"><code>..</code></mark></td><td>Is a range operator; 1..10 returns 10 objects, 1 through 10.</td></tr><tr><td><mark style="color:yellow;"><code>-f</code></mark></td><td>Is the format operator, replacing placeholders with values: "{0}, {1}" -f "Hello","World".</td></tr></tbody></table>
