[Top][All Lists]

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

Re: echo -n

From: Eric Blake
Subject: Re: echo -n
Date: Thu, 2 Feb 2017 09:11:36 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 02/02/2017 03:02 AM, Sangamesh Mallayya 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.

There is NO portable way to print those strings using 'echo'.  Use
'printf' instead.  POSIX even tells you to do that.

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

Not a bug.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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