Celeb Glow
updates | March 15, 2026

grep output is not in stdout or stderr

I'm trying to find files that contain 'ash' and 'bun' with the following bash command:

grep --line-buffered -ril ash | xargs -d '\n' grep -il bun

Output from the first grep only (the names of files containing 'ash') appears as expected on the terminal screen, but nothing is being printed to the pipe. I verified this with:

grep --line-buffered -ril ash &> junk

junk is empty.

I have GNOME Terminal 3.6.2, GNU grep 2.16 and Ubuntu 14.04. The output from grep is coloured.

I'm aware of grep's buffering quirks but the output appears on separate lines, so I assume it's being flushed.

Anybody?

4 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy