Skip to main content
added 7 characters in body
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

 

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

 

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

Rollback to Revision 3
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

deleted 309 characters in body
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

Linux the col manual (on Ubuntu) doesn't have the last sentence in there (but it works in the same way).

On Linux, unsetting the MAN_KEEP_FORMATTING environment variable (or setting it to an empty string) may also help, and will allow you to grep without passing the output of man through col -b.

If you look at any manual page, you'll notice that the headers are in bold. This is achieved through formatting them with control characters. To be able to grep like you're wanting to, these have to be stripped out.

The col utility may be used for this:

$ man bash | col -b | grep 'NAME' 

The -b option has the following description on OpenBSD:

Do not output any backspaces, printing only the last character written to each column position. This can be useful in processing the output of mandoc(1).

added 34 characters in body
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k
Loading
added 169 characters in body
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k
Loading
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k
Loading