Home Explore Blog CI



nushell

book/nushell_operator_map.md
25d3461d2a3dae2fff5b778db70fe2093d570e313186ef70000000030000099c
# Nushell operator map

The idea behind this table is to help you understand how Nu operators relate to other language operators. We've tried to produce a map of all the nushell operators and what their equivalents are in other languages. Contributions are welcome.

Note: this table assumes Nu 0.14.1 or later.

| Nushell | SQL      | Python             | .NET LINQ (C#)       | PowerShell             | Bash               |
| ------- | -------- | ------------------ | -------------------- | ---------------------- | ------------------ |
| ==      | =        | ==                 | ==                   | -eq, -is               | -eq                |
| !=      | !=, <>   | !=                 | !=                   | -ne, -isnot            | -ne                |
| <       | <        | <                  | <                    | -lt                    | -lt                |
| <=      | <=       | <=                 | <=                   | -le                    | -le                |
| >       | >        | >                  | >                    | -gt                    | -gt                |
| >=      | >=       | >=                 | >=                   | -ge                    | -ge                |
| =~      | like     | re, in, startswith | Contains, StartsWith | -like, -contains       | =~                 |
| !~      | not like | not in             | Except               | -notlike, -notcontains | ! "str1" =~ "str2" |
| +       | +        | +                  | +                    | +                      | +                  |
| -       | -        | -                  | -                    | -                      | -                  |
| \*      | \*       | \*                 | \*                   | \*                     | \*                 |
| /       | /        | /                  | /                    | /                      | /                  |
| \*\*    | pow      | \*\*               | Power                | Pow                    | \*\*               |
| in      | in       | re, in, startswith | Contains, StartsWith | -In                    | case in            |
| not-in  | not in   | not in             | Except               | -NotIn                 |                    |
| and     | and      | and                | &amp;&amp;                   | -And, &amp;&amp;               | -a, &amp;&amp;             |
| or      | or       | or                 | \|\|                 | -Or, \|\|              | -o, \|\|           |

Chunks
d547bbe1 (1st chunk of `book/nushell_operator_map.md`)
Title: Nushell Operator Equivalents in Other Languages
Summary
This section provides a table that maps Nushell operators to their equivalents in other languages such as SQL, Python, .NET LINQ (C#), PowerShell, and Bash. The table covers common operators for comparison, arithmetic, regular expressions, and logical operations.