[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash, echo or openssl bug?
From: |
Mike Frysinger |
Subject: |
Re: bash, echo or openssl bug? |
Date: |
Tue, 3 Jan 2012 12:37:15 -0500 |
User-agent: |
KMail/1.13.7 (Linux/3.1.0-atsc; KDE/4.6.5; x86_64; ; ) |
On Tuesday 03 January 2012 08:48:27 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. it makes
> the output hard to read because it is prepended
> to the prompt text, e.g. mySecretPasswordtcadmin@buildserver: ~$
>
> Repeat-By:
> 1. run the following code in bash terminal:
> echo OHBjcWNLNGlQaVF5 | openssl base64 -d
>
> 2. the output in the bash terminal looks like this:
> mySecretPasswordtcadmin@buildserver: ~$
there is no bug in any of these packages. openssl doesn't include a trailing
new line.
> 3. the output SHOULD look like this:
> mySecretPassword
> tcadmin@buildserver: ~$
then add it yourself:
$ echo OHBjcWNLNGlQaVF5 | openssl base64 -d; echo
$ out=$(echo OHBjcWNLNGlQaVF5 | openssl base64 -d); echo "${out}"
... many other ways ...
-mike
signature.asc
Description: This is a digitally signed message part.