문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top