Skip to content

Commit d96a53e

Browse files
authored
Add tee example to "coming from bash" (#1314)
Add `tee` example to "coming from bash"
1 parent 959847c commit d96a53e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

book/coming_from_bash.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Note: this table assumes Nu 0.60.0 or later.
2929
| `> /dev/null` | `\| ignore` | Discard command output |
3030
| `> /dev/null 2>&1` | `out+err> /dev/null` | Discard command output, including stderr |
3131
| `command arg1 arg2 2>&1 \| less` | `run-external --redirect-combine command [arg1 arg2] \| less` | Pipe stdout+stderr of a command into less, output updated live |
32+
| `cmd1 \| tee log.txt \| cmd2` | `cmd1 \| tee { save log.txt } \| cmd2` | Tee command output to a log file |
3233
| `cat <path>` | `open --raw <path>` | Display the contents of the given file |
3334
| | `open <path>` | Read a file as structured data |
3435
| `mv <source> <dest>` | `mv <source> <dest>` | Move file to new location |
@@ -55,7 +56,7 @@ Note: this table assumes Nu 0.60.0 or later.
5556
| `FOO=BAR ./bin` | `FOO=BAR ./bin` | Update environment temporarily |
5657
| `export FOO=BAR` | `$env.FOO = BAR` | Set environment variable for current session |
5758
| `echo $FOO` | `$env.FOO` | Use environment variables |
58-
| `echo ${FOO:-fallback}` | `$env.FOO? \| default "ABC"` | Use a fallback in place of an unset variable |
59+
| `echo ${FOO:-fallback}` | `$env.FOO? \| default "ABC"` | Use a fallback in place of an unset variable |
5960
| `unset FOO` | `hide-env FOO` | Unset environment variable for current session |
6061
| `alias s="git status -sb"` | `alias s = git status -sb` | Define an alias temporarily |
6162
| `type FOO` | `which FOO` | Display information about a command (builtin, alias, or executable) |
@@ -64,5 +65,5 @@ Note: this table assumes Nu 0.60.0 or later.
6465
| `bash <script file>` | `nu <script file>` | Run a script file |
6566
| `\` | `( <command> )` | A command can span multiple lines when wrapped with `(` and `)` |
6667
| `pwd` | `$env.PWD` | Display the current directory |
67-
| `read var` | `let var = input` | Get input from the user. |
68+
| `read var` | `let var = input` | Get input from the user |
6869

0 commit comments

Comments
 (0)