

Show HN: Ntee – portable Unix shell tee command in Node - stefanmaric
https://github.com/stefanmaric/ntee

======
chilicuil
I use this alias for tree:

alias tree='_tree(){ ([ -z "$1" ] || \cd $1 2>/dev/null && \find . -print |
sort | sed -e '\''1s/. _/ ┬/'\'' -e '\''s;[^/]_/;│ ;g;s;│ \\([^│]\\);├──
\1;g'\'';)}; _tree'

On Unix systems who doesn't have it

~~~
stefanmaric
Hey awesome! I usually have to install the `tree` package for that.

But `ntee` reassembles `tee`, not `tree`. :)

------
alexandersalas
Very good way, and it's a good boilerplate for new CLIs :)

------
v3ss0n
Need to install node runtime for this very simple cli?

~~~
alexstefan92
Yes. You wouldn't use this unless you're used to work with node.js, you have
`tee` on all unix-like systems.

I created `ntee` to replace `tee` inside NPM scripts, so they support both
unix-like systems and windows systems.

This is an interesting article that explains what NPM scripts are:
[http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-
tool...](http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/)

