[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Piping man into grep - grotty sgr0 message
From: |
Michael J. Donovan |
Subject: |
Piping man into grep - grotty sgr0 message |
Date: |
Tue, 18 Jul 2023 17:47:35 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
Updated to 1.23.0
man works as before, except when you pipe its output to another command.
man ls | grep color
grotty:<standard input>:(<standard input>):9: warning: unrecognized
X command 'sgr 0' ignored
--color[=WHEN]
The same thing happens here:
man ls | cat
In my .bashrc:
export MANROFFOPT='-c'
export GROFF_NO_SGR=1
The only way to suppress the grotty message is with brute force:
man ls 2>/dev/null | grep color
-Mike
- Piping man into grep - grotty sgr0 message,
Michael J. Donovan <=