Запись в текстовый файл с помощью оболочки добавляет символы

Здравствуйте, я пытаюсь написать man-страницу для bash в текстовый файл следующим образом:

man bash > bash.txt

Однако созданный текстовый файл содержит повторяющиеся символы, сгенерированные для каждого символа в заголовке, темах и определенных ключевых словах.

BASH(1)                                                                BASH(1)



NNAAMMEE
       bash - GNU Bourne-Again SHell

SSYYNNOOPPSSIISS
       bbaasshh [options] [file]

CCOOPPYYRRIIGGHHTT
       Bash is Copyright (C) 1989-2005 by the Free Software Foundation, Inc.

DDEESSCCRRIIPPTTIIOONN
       BBaasshh  is  an  sshh-compatible  command language interpreter that executes
       commands read from the standard input or from a file.  BBaasshh also incor-
       porates useful features from the _K_o_r_n and _C shells (kksshh and ccsshh).

       BBaasshh  is  intended  to  be a conformant implementation of the Shell and
       Utilities portion  of  the  IEEE  POSIX  specification  (IEEE  Standard
       1003.1).  BBaasshh can be configured to be POSIX-conformant by default.

OOPPTTIIOONNSS
       In  addition  to  the  single-character shell options documented in the
       description of the sseett builtin command, bbaasshh interprets  the  following
       options when it is invoked:

       --cc _s_t_r_i_n_g If  the  --cc  option  is  present, then commands are read from
                 _s_t_r_i_n_g.  If there are arguments after the  _s_t_r_i_n_g,  they  are
                 assigned to the positional parameters, starting with $$00.
       --ii        If the --ii option is present, the shell is _i_n_t_e_r_a_c_t_i_v_e.
       --ll        Make bbaasshh act as if it had been invoked as a login shell (see
                 IINNVVOOCCAATTIIOONN below).
       --rr        If the --rr option is present,  the  shell  becomes  _r_e_s_t_r_i_c_t_e_d
                 (see RREESSTTRRIICCTTEEDD SSHHEELLLL below).
       --ss        If  the --ss option is present, or if no arguments remain after
                 option processing, then commands are read from  the  standard
                 input.   This  option  allows the positional parameters to be
                 set when invoking an interactive shell.
       --DD        A list of all double-quoted strings preceded by $$ is  printed
                 on  the standard output.  These are the strings that are sub-
                 ject to language translation when the current locale is not CC
                 or  PPOOSSIIXX.   This  implies the --nn option; no commands will be
                 executed.
       [[--++]]OO [[_s_h_o_p_t___o_p_t_i_o_n]]
                 _s_h_o_p_t___o_p_t_i_o_n is one of the  shell  options  accepted  by  the
                 sshhoopptt   builtin  (see  SSHHEELLLL  BBUUIILLTTIINN  CCOOMMMMAANNDDSS  below).   If
                 _s_h_o_p_t___o_p_t_i_o_n is present, --OO sets the value of that option; ++OO
                 unsets  it.   If  _s_h_o_p_t___o_p_t_i_o_n is not supplied, the names and
                 values of the shell options accepted by sshhoopptt are printed  on
                 the  standard  output.   If  the invocation option is ++OO, the
                 output is displayed in a format that may be reused as  input.
       ----        A  ----  signals the end of options and disables further option
                 processing.  Any arguments after the ---- are treated as  file-
                 names and arguments.  An argument of -- is equivalent to ----.

       BBaasshh  also  interprets  a  number  of  multi-character  options.  These
       options must appear on the command  line  before  the  single-character
       options to be recognized.

       ----ddeebbuuggggeerr
              Arrange for the debugger profile to be executed before the shell
              starts.  Turns on extended debugging mode (see  the  description
              of  the  eexxttddeebbuugg  option  to the sshhoopptt builtin below) and shell
              function tracing (see the description of the --oo ffuunnccttrraaccee option
              to the sseett builtin below).
       ----dduummpp--ppoo--ssttrriinnggss
              Equivalent  to --DD, but the output is in the GNU _g_e_t_t_e_x_t ppoo (por-
              table object) file format.
       ----dduummpp--ssttrriinnggss
              Equivalent to --DD.
       ----hheellpp Display a usage message on standard  output  and  exit  success-
              fully.
       ----iinniitt--ffiillee _f_i_l_e
       ----rrccffiillee _f_i_l_e
              Execute commands from _f_i_l_e instead of the standard personal ini-
              tialization file _~_/_._b_a_s_h_r_c if  the  shell  is  interactive  (see
              IINNVVOOCCAATTIIOONN below).

       ----llooggiinn
              Equivalent to --ll.

       ----nnooeeddiittiinngg
              Do  not  use the GNU rreeaaddlliinnee library to read command lines when
              the shell is interactive.

       ----nnoopprrooffiillee
              Do not read either the system-wide startup file _/_e_t_c_/_p_r_o_f_i_l_e  or
              any   of  the  personal  initialization  files  _~_/_._b_a_s_h___p_r_o_f_i_l_e,
              _~_/_._b_a_s_h___l_o_g_i_n, or _~_/_._p_r_o_f_i_l_e.   By  default,  bbaasshh  reads  these
              files  when  it  is  invoked  as  a  login shell (see IINNVVOOCCAATTIIOONN
              below).

       ----nnoorrcc Do  not  read  and  execute  the  personal  initialization  file
              _~_/_._b_a_s_h_r_c  if  the  shell  is interactive.  This option is on by
              default if the shell is invoked as sshh.

       ----ppoossiixx
              Change the behavior of bbaasshh where the default operation  differs
              from the POSIX standard to match the standard (_p_o_s_i_x _m_o_d_e).

       ----rreessttrriicctteedd
              The shell becomes restricted (see RREESSTTRRIICCTTEEDD SSHHEELLLL below).

       ----vveerrbboossee
              Equivalent to  --vv.

       ----vveerrssiioonn
              Show  version information for this instance of bbaasshh on the stan-
              dard output and exit successfully.

Как создать текстовый файл, который является точным представлением справочной страницы bash? Я попытался повторить команду в новом окне терминала, но это не сработало, и вывод

man bash

правильно в окне терминала.

Спасибо!

0 ответов

Другие вопросы по тегам