help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to prevent parameters being interpreted in pipe?


From: John McKown
Subject: Re: [Help-bash] How to prevent parameters being interpreted in pipe?
Date: Mon, 5 Dec 2016 07:49:48 -0600

On Mon, Dec 5, 2016 at 6:57 AM, Patrick Schleizer <
address@hidden> wrote:

> That doesn't work either.
>
> printf -- "%s\n" "-e test" | base64 -d
> base64: invalid input
>
>
The message seems reasonable to me.​

​The string "-e test" is not valid base64 encoded data. The "base64 -d"
says to decode base64 input back into a "normal" string.

Transcript:

[~]$ printf -- "%s\n" "-e test" | base64 -d
base64: invalid input
[~]$ printf -- "%s\n" "-e test"
-e test
[~]$ printf -- "%s\n" "-e test" | base64
LWUgdGVzdAo=
[~]$ printf -- "%s\n" "-e test" | base64 | base64 -d
-e test
[~]$





-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown


reply via email to

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