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: Patrick Schleizer
Subject: Re: [Help-bash] How to prevent parameters being interpreted in pipe?
Date: Mon, 05 Dec 2016 12:57:00 +0000

That doesn't work either.

printf -- "%s\n" "-e test" | base64 -d
base64: invalid input

Matthew Cengia:
> Don't use echo; use printf with -- as an argument:
> 
> printf -- '%s\n" "-e test"
> 
> On Mon, Dec 5, 2016 at 6:55 AM, Patrick Schleizer <
> address@hidden> wrote:
> 
>> Hi,
>>
>> code talks. :)
>>
>> works:
>> echo "test" | base64 -d
>>
>> works:
>> echo "--INVALID something" | grep thing
>>
>> Let's assume the input would be different.
>>
>> does not work:
>> echo "-e test" | base64 -d
>>
>> Why works base64 different?
>>
>> How to prevent interpreting "-e" as parameter? I.e. how to have it
>> interpreter as string?
>>
>> Cheers,
>> Patrick
>>
>>
> 
> 




reply via email to

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