All Projects → stefanmaric → ntee

stefanmaric / ntee

Licence: MIT License
Portable Unix shell command 'tee', with some extras - read from standard input and write to standard output and files

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ntee

ploot
Plot streaming data from stdin to a tty terminal
Stars: ✭ 54 (+145.45%)
Mutual labels:  pipe, stdin
termijack
TermiJack surreptitiously hijacks standard streams (stdin, stdout, and/or stderr) from an already running process.
Stars: ✭ 166 (+654.55%)
Mutual labels:  stdout, stdin
anewer
anewer appends lines from stdin to a file if they don't already exist in the file. This is a rust version of https://github.com/tomnomnom/anew
Stars: ✭ 46 (+109.09%)
Mutual labels:  stdout, stdin
envsensor-observer-py
Python Bluetooth low energy observer example for OMRON Environment Sensor (2JCIE-BL01)
Stars: ✭ 31 (+40.91%)
Mutual labels:  stdout
generator-react-web
Yeoman generator for creating interactive web sites with React and Redux + Webpack, Flow, ES7+, Babel, Yarn, npm Scripts, i18n, Redux Saga, SCSS, CSS Modules
Stars: ✭ 35 (+59.09%)
Mutual labels:  npm-scripts
evry
Split STDIN stream and execute specified command every N lines/seconds.
Stars: ✭ 61 (+177.27%)
Mutual labels:  stdin
contact
This is a command line application for contact management with pipes in mind using a file based storage.
Stars: ✭ 27 (+22.73%)
Mutual labels:  pipe
smag
Show Me A Graph - Command Line Graphing
Stars: ✭ 78 (+254.55%)
Mutual labels:  stdout
observable ish
Observable state and events for browser and Flutter.
Stars: ✭ 26 (+18.18%)
Mutual labels:  pipe
gee
🏵 Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go
Stars: ✭ 65 (+195.45%)
Mutual labels:  tee
V8Power
Putting the power of an 8-cylinder engine under the hood of DOS batch files.
Stars: ✭ 30 (+36.36%)
Mutual labels:  stdout
QwerteeTelegramBot
This bot shows you today's posts from Qwertee.
Stars: ✭ 18 (-18.18%)
Mutual labels:  tee
pv
Unix Pipe Viewer (pv) utility in Node.js
Stars: ✭ 20 (-9.09%)
Mutual labels:  pipe
select-run
A CLI tool to interactively search & select one or many package.json npm scripts to run
Stars: ✭ 29 (+31.82%)
Mutual labels:  npm-scripts
incubator-teaclave-trustzone-sdk
Teaclave TrustZone SDK enables safe, functional, and ergonomic development of trustlets.
Stars: ✭ 126 (+472.73%)
Mutual labels:  tee
files-io
Read many files with node
Stars: ✭ 19 (-13.64%)
Mutual labels:  pipe
lwprintf
Lightweight printf library optimized for embedded systems
Stars: ✭ 98 (+345.45%)
Mutual labels:  stdout
pipe-trait
Make it possible to chain regular functions
Stars: ✭ 22 (+0%)
Mutual labels:  pipe
pipe here
An Elixir macro for easily piping arguments at any position.
Stars: ✭ 33 (+50%)
Mutual labels:  pipe
prox
A Scala library for working with system processes
Stars: ✭ 93 (+322.73%)
Mutual labels:  pipe

ntee

Portable Unix shell command tee, with some extras — read from standard input and write to standard output and files.

TL;DR

gulp.dest() in middle of a pipe? NPM scripts can do as well:

{
  "scripts": {
    "less": "lessc main.less | postcss --use autoprefixer | ntee main.css | cleancss > main.min.css"
  }
}

Install

$ npm install -g ntee

Check

$ ntee --help

Use

Usage:
  ntee [OPTION]... FILE...

  Copy standard input to each FILE, and also to standard output.

Options:
  -a, --append              append to the given FILEs, do not overwrite
  -i, --ignore-interrupts   ignore interrupt signals
  -s, --suppress            do not output to stdout
  -v, --version             display the current version
  -h, --help                display help and usage details
$ whoami | ntee file1.txt file2.txt

Will print current user to stdout and also to file1.txt and file2.txt. Note that if these files already exist, they will be overwritten. Use -a/--append to avoid it, just like you would do with Richard Stallman's tee:

$ whoami | ntee -a i-wont-be-overwritten.txt

-i/--ignore-interrupts will prevent CTRL+C from killing ntee. Won't work on windows.

I also added an -s/--suppress option to suppress output to stdout. This meant to be used on npm scripts:

$ echo "Nothing will be shown in screen" | ntee -s but-it-will-be-saved-here.txt

You can always pipe:

cat long.log | sort | ntee sorted.log | head

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].