Skip to content

Commit 83257dc

Browse files
authored
Add nushell equivalents of various cat incantations
1 parent ce67743 commit 83257dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

book/coming_from_bash.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ $env.Path = ($env.Path | prepend 'C:\Program Files\Git\usr\bin')
4242
| `command \| head -5` | `command \| first 5` | Limit the output to the first 5 rows of an internal command (see also `last` and `skip`) |
4343
| `cat <path>` | `open --raw <path>` | Display the contents of the given file |
4444
| | `open <path>` | Read a file as structured data |
45+
| `cat <(<command1>) <(<command2>)` | `[(command1), (command2)] \| str join` | Concatenate the outputs of command1 and command2 |
46+
| `cat <path> <(<command>)` | `[(open --raw <path>), (command)] \| str join` | Concatenate the contents of the given file and output of command |
4547
| `mv <source> <dest>` | `mv <source> <dest>` | Move file to new location |
4648
| `for f in *.md; do echo $f; done` | `ls *.md \| each { $in.name }` | Iterate over a list and return results |
4749
| `for i in $(seq 1 10); do echo $i; done` | `for i in 1..10 { print $i }` | Iterate over a list and run a command on results |

0 commit comments

Comments
 (0)