Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't pipe through multiple commands #44

Open
cphoover opened this issue Jan 13, 2017 · 1 comment
Open

can't pipe through multiple commands #44

cphoover opened this issue Jan 13, 2017 · 1 comment

Comments

@cphoover
Copy link

I can't pipe through multiple commands I'm thinking it's getting caught in buffering and not flushing output.

but this isn't working

chokidar **/*.scala | awk -F: '{print $2}' | awk -F/ '{print $1}'

isn't working at all

@jchook
Copy link

jchook commented Jul 9, 2022

This is an issue for me as well. I see no output when piping certain commands, e.g.

chokidar src | cat
chokidar src | xargs -L1

Surprisingly, adding the -c flag fixes the issue for some cases, e.g.

chokidar src -c '' | cat

For a sanity check, we can see these examples:

do_timer() { while true; do echo 1; sleep 1; done }

# Works
do_timer | cat
do_timer | xargs -L1
do_timer | cut -f1

# Broken
do_timer | cut -f1 | xargs -L1

Node v16.14.0
x86 Linux 5.15.52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants