Follow

Normal pipes in bash/zsh only redirect stdout to the target process. If you, for example want to grep the output of strace you need to also redirect stderr to the target. You can do this by strace ls |& grep open. On older versions of bash you need the less handy strace ls 2>&1 | grep open.

· · Web · 1 · 0 · 1

@nudin Wait, that changed?

`2>&1` made sense to me (you could have more channels, after all).

Sign in to participate in the conversation
Layer8 in Space

Welcome to the 8th Layer of Madness

Most topics are related to Linux, Anime, Music, Software and maaaany more