Question

This entirely useless command excludes everything piped to grep, as expected:

$ man man | grep -v '.*'
$

How am I getting output from piping bind -p to this?

$ bind -p | grep -v '.*'
"?": self-insert
"?": self-insert
"?": self-insert
"?": self-insert
"?": self-insert
(227 more...)

The exit code is 0 and there is nothing written to stderr.

Was it helpful?

Solution

On my machine, your "?" is actually "�". That's the UNICODE character used as a fallback when decoding fails.

It looks like bind -p outputs invalid UTF-8 sequences, and grep -v '.*' does not filter them because it cannot decode them in the first place.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top