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

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

Re: bug in echo


From: Jim Meyering
Subject: Re: bug in echo
Date: Sat, 08 Dec 2001 08:25:30 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)

Leslie Ballentine <address@hidden> wrote:
> Using RedHat Linux 7.1, kernel 2.4.9-6, I obtain the following:
>
>     /bin/echo "atime: \c"; ls -dlu findx
> atime: \c
> -rwx--x--x    1 ballenti ballenti      376 Nov 30 10:49 findx
>
>
> Under Solaris, I obtain:
>
>     /bin/echo "atime: \c"; ls -dlu findx
> atime: -rwx--x--x   1 ballenti users        376 Oct 30 12:34 findx
>
> Apparently, the line-continuation character, "\c", is not working under
> Linux.

Thanks for the report, but it's not a bug.
To enable that, you have to use echo's -e option:

  /bin/echo -e "atime: \c"; ls -dlu findx


  $ /bin/echo --help
  Usage: /bin/echo [OPTION]... [STRING]...
  Echo the STRING(s) to standard output.

    -n              do not output the trailing newline
    -e              enable interpretation of the backslash-escaped characters
                      listed below
        --help      display this help and exit (should be alone)
        --version   output version information and exit (should be alone)

  With -e, the following sequences are recognized and interpolated:

    \NNN   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

  Report bugs to <address@hidden>.



reply via email to

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