views:

51

answers:

4

When I use Solaris, I get page numbers every 60 lines or so that look like this

SunOS 5.11          Last change: 10 Feb 2009                    1

Also, I get headers like

User Commands                         ls(1)

Is there any way to remove them? It's distracting to have them appear when I'm reading text line by line.

A: 

man pages are generally troff-formatted documents, so short of editing the various pages to remove the actual text I don't think there's any way to not see them.

Joe
A: 

try this

man grep | nawk 'NR>2'| more
A: 

I ended up removing them by editing the standard macro package (nroff) at /usr/share/lib/tmac/an to not show headers and footers.

Steven
A: 

This is what I wrote to strip off these headers:

  /usr/bin/man $@ | nawk '
  BEGIN { i=0 }
  /SunOS 5.* *Last change:/ {
  for(j=0;j<i-3;j++) printf("%s\n",line[j]);
  for(j=0;j<10;j++) getline;
  i=0; continue;
  }
  { line[i]=$0; i++; }
  ' | ${PAGER:-more}
jlliagre