Home Explore Blog CI



nushell

book/nushell_map.md
286214af670fc9811f42404835ce1cdee318d26865202af600000003000043bd
# Nu map from other shells and domain specific languages

The idea behind this table is to help you understand how Nu builtins and plugins relate to other known shells and domain specific languages. We've tried to produce a map of relevant Nu commands and what their equivalents are in other languages. Contributions are welcome.

| Nushell                                                    | SQL                           | .Net LINQ (C#)                                       | PowerShell (without external modules)      | Bash                                            |
| ---------------------------------------------------------- | ----------------------------- | ---------------------------------------------------- | ------------------------------------------ | ----------------------------------------------- |
| [`alias`](/commands/docs/alias.md)                         |                               |                                                      | `alias`                                    | `alias`                                         |
| [`append`](/commands/docs/append.md)                       |                               | `Append`                                             | `-Append`                                  |                                                 |
| [`math avg`](/commands/docs/math_avg.md)                   | `avg`                         | `Average`                                            | `Measure-Object`, `measure`                |                                                 |
| [Operators](operators.md) and [`math`](/commands/docs/math.md) | Math operators            | `Aggregate`, `Average`, `Count`, `Max`, `Min`, `Sum` |                                            | `bc`                                            |
| [`cd`](/commands/docs/cd.md)                               |                               |                                                      | `Set-Location`, `cd`                       | `cd`                                            |
| [`clear`](/commands/docs/clear.md)<br /><kbd>Ctrl/⌘</kbd>+<kbd>L</kbd> |                  |                                                      | `Clear-Host`<br /><kbd>Ctrl/⌘</kbd>+<kbd>L</kbd>  | `clear`<br /><kbd>Ctrl/⌘</kbd>+<kbd>L</kbd> |
| [`config`](/commands/docs/config.md)<br />`$nu.default-config-dir`  |                      |                                                      | `$Profile`                                 | `~/.bashrc`, `~/.profile`                       |
| [`cp`](/commands/docs/cp.md)                               |                               |                                                      | `Copy-Item`, `cp`, `copy`                  | `cp`                                            |
| [`date`](/commands/docs/date.md)                           | `NOW()`, `getdate()`          | `DateTime` class                                     | `Get-Date`                                 | `date`                                          |
| [`du`](/commands/docs/du.md)<br />[`ls --du`](/commands/docs/ls.md) |                      |                                                      |                                            | `du`                                            |
| [`each`](/commands/docs/each.md)                           | Cursors                       |                                                      | `ForEach-Object`, `foreach`, `for`         | `for`                                           |
| [`exit`](/commands/docs/exit.md)<br /><kbd>Ctrl/⌘</kbd>+<kbd>D</kbd> |                    |                                                      | `exit`<br /><kbd>Ctrl/⌘</kbd>+<kbd>D</kbd> | `exit`<br /><kbd>Ctrl/⌘</kbd>+<kbd>D</kbd>    | 
| [`http`](/commands/docs/http.md)                           |                               | `HttpClient`, `WebClient`, `HttpWebRequest/Response` | `Invoke-WebRequest`                        | `wget`, `curl`                                  |
| [`first`](/commands/docs/first.md)                         | `top`, `limit`                | `First`, `FirstOrDefault`                            | `Select-Object -First`                     | `head`                                          |
| [`format`](/commands/docs/format.md), [`str`](/commands/docs/str.md) |                     | `String.Format`                                      | `String.Format`                            | `printf`                                        |
| [`from`](/commands/docs/from.md)                           | `import flatfile,` `openjson`, `cast(variable as xml) `|                             | `Import/ConvertFrom-{Csv,Xml,Html,Json}`   |                                                 |
| [`get`](/commands/docs/get.md)                             |                               | `Select`                                             | `(cmd).column`                             |                                                 |
| [`group-by`](/commands/docs/group-by.md)                   | `group by`                    | `GroupBy`, `group`                                   | `Group-Object`, `group`                    |                                                 |
| [`help`](/commands/docs/help.md)                           | `sp_help`                     |                                                      | `Get-Help`, `help`, `man`                  | `man`                                           |
| [`history`](/commands/docs/history.md)                     |                               |                                                      | `Get-History`, `history`                   | `history`                                       |
| [`is-empty`](/commands/docs/is-empty.md)                   | `is null`                     | `String.IsNullOrEmpty`                               | `String.IsNullOrEmpty`                     |                                                 |
| [`kill`](/commands/docs/kill.md)                           |                               |                                                      | `Stop-Process`, `kill`                     | `kill`                                          |
| [`last`](/commands/docs/last.md)                           |                               | `Last`, `LastOrDefault`                              | `Select-Object -Last`                      | `tail`                                          |
| [`str stats`](/commands/docs/str_stats.md)<br />[`length`](/commands/docs/length.md)<br />[`str length`](/commands/docs/str_length.md) | `count`  | `Count`                                        | `Measure-Object`, `measure`                | `wc`                                            |
| [`lines`](/commands/docs/lines.md)                         |                               |                                                      | `File.ReadAllLines`                        |                                                 |
| [`ls`](/commands/docs/ls.md)                               |                               |                                                      | `Get-ChildItem`, `dir`, `ls`               | `ls`                                            |
| [`mkdir`](/commands/docs/mkdir.md)                         |                               |                                                      | `mkdir`, `md`, `New-Item -ItemType Directory` | `mkdir`                                      |
| [`mv`](/commands/docs/mv.md)                               |                               |                                                      | `Move-Item`, `mv`, `move`, `mi`            | `mv`                                            |
| [`open`](/commands/docs/open.md)                           |                               |                                                      | `Get-Content`, `gc`, `cat`, `type`         | `cat`                                           |
| [`print`](/commands/docs/print.md)                         | `print`, `union all`          |                                                      | `Write-Output`, `write`                    | `echo`, `print`                                 |
| [`transpose`](/commands/docs/transpose.md)                 | `pivot`                       |                                                      |                                            |                                                 |
| [`ps`](/commands/docs/ps.md)                               |                               |                                                      | `Get-Process`, `ps`, `gps`                 | `ps`                                            |
| [`pwd`](/commands/docs/pwd.md)                             |                               |                                                      | `Get-Location`, `pwd`                      | `pwd`                                           |
| [`range` (command)](/commands/docs/range.md)               | `limit x offset y`, `rownumber` | `ElementAt`                                        | `[x]`, indexing operator, `ElementAt`      |                                                 |
| [`range` (type)](types_of_data.html#ranges)                |                               | `Range`                                              | `1..10`, `'a'..'f'`                        |                                                 |
| [`reduce`](/commands/docs/reduce.md)                       |                               | `Aggregate`                                          |                                            |                                                 |
| [`rename`](/commands/docs/rename.md)                       |                               |                                                      | `Rename-Item`, `ren`, `rni`                | `mv`                                            |
| [`rm`](/commands/docs/rm.md)                               |                               |                                                      | `Remove-Item`, `del`, `erase`, `rd`, `ri`, `rm`, `rmdir` | `rm`                              |
| [`save`](/commands/docs/save.md)                           |                               |                                                      | `Write-Output`, `Out-File`                 | `> foo.txt` redirection                         |
| [`select`](/commands/docs/select.md)                       | `select`                      | `Select`                                             | `Select-Object`, `select`                  |                                                 |
| [`shuffle`](/commands/docs/shuffle.md)                     |                               | `Random`                                             | `Sort-Object {Get-Random}`                 |                                                 |
| [`skip`](/commands/docs/skip.md)                           | `where row_number()`          | `Skip`                                               | `Select-Object -Skip`                      |                                                 |
| [`skip until`](/commands/docs/skip_until.md)               |                               | `SkipWhile`                                          |                                            |                                                 |
| [`skip while`](/commands/docs/skip_while.md)               |                               | `SkipWhile`                                          |                                            |                                                 |
| [`sort-by`](/commands/docs/sort-by.md)                     | `order by`                    | `OrderBy`, `OrderByDescending`, `ThenBy`, `ThenByDescending` | `Sort-Object`, `sort`              | `sort`                                          |
| [`str`](/commands/docs/str.md)                             | String functions              | `String` class                                       | `String` class                             |                                                 |
| [`str join`](/commands/docs/str_join.md)                   | `concat_ws`                   | `Join`                                               | `Join-String`                              |                                                 |
| [`str trim`](/commands/docs/str_trim.md)                   | `rtrim`, `ltrim`              | `Trim`, `TrimStart`, `TrimEnd`                       | `Trim`                                     |                                                 |
| [`math sum`](/commands/docs/math_sum.md)                   | ``sum`                        | `Sum`                                                | `Measure-Object`, `measure`                |                                                 |
| [`uname`](/commands/docs/uname.md)<br />[`sys host`](/commands/docs/sys_host.md)                   |                               |                                                      | `Get-ComputerInfo`                         | `uname`                                         |
| [`sys disks`](/commands/docs/sys_disks.md)                 |                               |                                                      | `Get-ComputerInfo`                         | `lsblk`                                         |
| [`sys mem`](/commands/docs/sys_mem.md)                     |                               |                                                      | `Get-ComputerInfo`                         | `free`                                          |
| [`table`](/commands/docs/table.md)                         |                               |                                                      | `Format-Table`, `ft`, `Format-List`, `fl`  |                                                 |
| [`take`](/commands/docs/take.md)                           | `top`, `limit`                | `Take`                                               | `Select-Object -First`                     | `head`                                          |
| [`take until`](/commands/docs/take_until.md)               |                               | `TakeWhile`                                          |                                            |                                                 |
| [`take while`](/commands/docs/take_while.md)               |                               | `TakeWhile`                                          |                                            |                                                 |
| [`timeit`](/commands/docs/timeit.md)                       |                               |                                                      | `Measure-Command`                          | `time`                                          |
| [`to`](/commands/docs/to.md)                               |                               |                                                      | `Export`/`ConvertTo-{Csv,Xml,Html,Json}`   |                                                 |
| [`touch`](/commands/docs/touch.md)                         |                               |                                                      | `Set-Content`                              | `touch`                                         |
| [`uniq`](/commands/docs/uniq.md)                           | `distinct`                    | `Distinct`                                           | `Get-Unique`, `gu`                         | `uniq`                                          |
| [`update`](/commands/docs/update.md)                       |                               |                                                      | `ForEach-Object`                           |                                                 |
| [`upsert`](/commands/docs/upsert.md)                       | `As`                          |                                                      | `ForEach-Object`                           |                                                 |
| [`version`](/commands/docs/version.md)                     | `select @@version`            |                                                      | `$PSVersionTable`                          |                                                 |
| `$env.FOO = "bar"`<br />[`with-env`](/commands/docs/with-env.md) |                         |                                                      | `$env:FOO = 'bar'`                         | `export FOO "bar"`                              |
| [`where`](/commands/docs/where.md)                         | `where`                       | `Where`                                              | `Where-Object`, `where`, `?` operator      |                                                 |
| [`which`](/commands/docs/which.md)                         |                               |                                                      | `Get-Command`                              | `which`                                         |

Chunks
c15ce0e5 (1st chunk of `book/nushell_map.md`)
9469545d (2nd chunk of `book/nushell_map.md`)
ee20bcb4 (3rd chunk of `book/nushell_map.md`)
a4c97906 (4th chunk of `book/nushell_map.md`)
0677fe9c (5th chunk of `book/nushell_map.md`)
9b0a5ca6 (6th chunk of `book/nushell_map.md`)