bug-bash
[Top][All Lists]
Advanced

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

Re: bash, echo or openssl bug?


From: nick humphrey
Subject: Re: bash, echo or openssl bug?
Date: Wed, 4 Jan 2012 00:31:19 +0100

thanks eric and mike for your quick reply and suggestions =)

2012/1/3 Eric Blake <eblake@redhat.com>

> 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   eblake@redhat.com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>


reply via email to

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