I'm trying to write a simple script to format my man pages, but I've run into a broken pipe error.
These lines both cause the error:
env MANPAGER=cat man $foo
man -P cat $foo
and this is the script I'm ultimately trying to use (converts underlines into italics)
man -P ul "$1" | sed -e $'s/\033\\[4m/\033\\[3m/g' -e $'s/\033\\[24m/\033\\[23m/g'
I get the same problem with cat
, ul
, and tee
, and the only thing that seems to work is less
.
echo
is causing it too. – 0942v8653 Aug 23 '14 at 16:11