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, && | -a, && |
|| | or | or | || | -Or, || | -o, || |