0

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.

Steven
  • 2,538
  • 3
  • 31
  • 40

4 Answers4

0

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
  • 41,484
  • 20
  • 104
  • 125
0

try this

man grep | nawk 'NR>2'| more
ghostdog74
  • 327,991
  • 56
  • 259
  • 343
0

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
  • 2,538
  • 3
  • 31
  • 40
0

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
  • 29,783
  • 6
  • 61
  • 72