bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Man pages: fixes to echo(1) and printf(1)


From: Alessandro Selli
Subject: Man pages: fixes to echo(1) and printf(1)
Date: Sat, 4 May 2002 16:02:09 +0200 (CEST)

  Hello,
        The following are the fixes I introduced to correct the wrong
formatting of  man 1 echo  and  man 1 printf  .  These two commands used to
look like this:

================================

address@hidden ~]# man 1 printf

[...]

DESCRIPTION
       Print ARGUMENT(s) according to FORMAT.

       --help display this help and exit

       --version
              output version information and exit

       FORMAT  controls  the  output as in C printf.  Interpreted
       sequences are:

       double quote

        NNN   character with octal value NNN (0 to 3 digits)

       b      backslash
       a
       c....  alert (BEL)
       k
       s.TP   produce no further output
       p
       a
       form feed
       e

       new line
              carriage return

              horizontal tab

       vertical tab

       N      character with hexadecimal value NNN (1 to  3  dig-
              its)

       %%     a single %

       %b     ARGUMENT as a string with `

       and  all  C  format  specifications  ending  with  one  of
       diouxXfeEgGcs, with ARGUMENTs  converted  to  proper  type
       first.  Variable widths are handled.

[...]

================================

address@hidden ~]# man 1 printf

[...]

DESCRIPTION
       Echo the STRING(s) to standard output.

       -n     do not output the trailing newline

       -e     enable   interpretation  of  the  backslash-escaped
              characters

              listed below

       -E     disable  interpretation  of  those   sequences   in
              STRINGs

       --help display this help and exit (should be alone)

       --version
              output  version  information  and  exit  (should be
              alone)

       Without -E, the following  sequences  are  recognized  and
       interpolated:

       the character whose ASCII code is NNN (octal)

       b      backslash
       a
       c....  alert (BEL)
       k
       s.TP   suppress trailing newline
       p
       a
       form feed
       e

       new line
              carriage return

              horizontal tab

       vertical tab

[...]

================================


  The DESCRIPTIONS failed to show bold text and heading slashes.
  The two files I included show the two man pages like the following:

================================

[...]

DESCRIPTION
       Print ARGUMENT(s) according to FORMAT.

       --help display this help and exit

       --version
              output version information and exit

       FORMAT  controls  the  output as in C printf.  Interpreted
       sequences are:

       \"     double quote

       \0NNN  character with octal value NNN (0 to 3 digits)

       \\     backslash

       \a     alert (BEL)

       \b     backspace

       \c     produce no further output

       \f     form feed

       \n     new line

       \r     carriage return

       \t     horizontal tab

       \v     vertical tab

       \xNNN  character with hexadecimal value NNN (1 to  3  dig-
              its)

       %%     a single %

       %b     ARGUMENT as a string with `\' escapes interpreted

       and  all  C  format  specifications  ending  with  one  of
       diouxXfeEgGcs, with ARGUMENTs  converted  to  proper  type
       first.  Variable widths are handled.

[...]

================================

[...]

DESCRIPTION
       Echo the STRING(s) to standard output.

       -n     do not output the trailing newline

       -e     enable   interpretation  of  the  backslash-escaped
              characters

              listed below

       -E     disable  interpretation  of  those   sequences   in
              STRINGs

       --help display this help and exit (should be alone)

       --version
              output  version  information  and  exit  (should be
              alone)

       Without -E, the following  sequences  are  recognized  and
       interpolated:

       the character whose ASCII code is NNN (octal)

       \      backslash

       \a     alert (BEL)

       \b     backspace

       \c     suppress trailing newline

       \f     form feed

       \n     new line

       \r     carriage return

       \t     horizontal tab

       \v     vertical tab


[...]

================================

  I'm using the following versions of the two commands on a Debian 2.2r4:

address@hidden ~]# /bin/echo --version
echo (GNU sh-utils) 2.0
Written by FIXME unknown.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
address@hidden ~]# /usr/bin/printf --version
printf (GNU sh-utils) 2.0
Written by David MacKenzie.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


  Thank you,




  Sandro



-- 
Bellum se ipsum alet.
       La guerra nutre se stessa.

Livio, "Ab urbe condita", XXXIV,9

Attachment: echo.1.gz
Description: Corrected man(1)

Attachment: printf.1.gz
Description: Corrected printf(1)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]