bug-bash
[Top][All Lists]
Advanced

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

Re: echo -n


From: Pierre Gaston
Subject: Re: echo -n
Date: Thu, 2 Feb 2017 17:15:32 +0200



On Thu, Feb 2, 2017 at 11:02 AM, Sangamesh Mallayya <sangamesh.swamy@in.ibm.com> wrote:
Hi,

description:
in bash echo -n , echo -e , echo -E has a special meaning. But we do not
have a way in bash shell if we want to print
-n , -e and -E using echo command. Other shells supports printing of
-n/-e/-E options using echo command.

For example

with ksh
# echo -n
-n
#

with bash
# echo -n

#

Please let us know if this a bug or do we have any other option to print
-n ?

Here is the environment details.

version: bash 4.3
Hardware and Operating System P7 AIX
Compiled with AIX xlc

Thanks,
-Sangamesh




Not a bug, echo is not portable and posix recommends using printf e.g.

printf '%s\n' -n

reply via email to

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