This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: man redirect error


Reid Thompson wrote on 2012-01-04: 
> On Tue, 2012-01-03 at 15:30 -0600, Nellis, Kenneth wrote:
>> Thought maybe someone would be interested in the following error.
>> 
>> $ man gcc | head
>> GCC(1)                                GNU
>> GCC(1)
>> 
>> 
>> 
>> NAME
>>        gcc - GNU project C and C++ compiler
>> SYNOPSIS
>>        gcc [-c|-S|-E] [-std=standard]
>>            [-g] [-pg] [-Olevel]
>> Error executing formatting or display command.
>> System command (cd "/usr/share/man" && (echo ".pl 11i"; /usr/bin/gunzip
>> -c '/usr/share/man/man1/gcc.1.gz') | /usr/bin/tbl | /usr/bin/nroff -c
>> -mandoc 2>/dev/null | /usr/bin/less -isrR) exited with status 36096.
>> No manual entry for gcc
>> $
> 
> 
> probably not.  Why are you wanting to head the output?  Man already
> displays using a pager.

Perhaps the OP was looking for something like apropos or whatis?

Given that man already pipes its output through a pager, the OP could just use the MANPAGER environment variable to do what he wants:

$ MANPAGER=head man gcc
GCC(1)                                GNU                               GCC(1)



NAME
       gcc - GNU project C and C++ compiler

SYNOPSIS
       gcc [-c|-S|-E] [-std=standard]
           [-g] [-pg] [-Olevel]

Hope this helps,
--
Bryan Thrall
Principal Software Engineer
FlightSafety International
bryan.thrall@flightsafety.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]