[Top][All Lists]

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

Re: bash, echo or openssl bug?

From: Eric Blake
Subject: Re: bash, echo or openssl bug?
Date: Tue, 03 Jan 2012 10:30:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/03/2012 06:48 AM, nick humphrey wrote:
> Description:
>         i dont know if the bug is a bash bug or openssl or echo, but when i
> echo a string and pipe it to openssl, the
> output comes on the same line as the prompt instead of a new line.

None of the above.  It's not a bug.  Your encoded string does not have a
trailing newline, and your $PS1 settings don't inject a starting
newline, so the behavior is expected.  If you want to guarantee a
trailing newline, then add one manually:

>         1. run the following code in bash terminal:
> echo OHBjcWNLNGlQaVF5 | openssl base64 -d

echo OHBjcWNLNGlQaVF5 | openssl base64 -d && echo

or modify your PS1 to start with a newline request.

Eric Blake   address@hidden    +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]