curl-users
Re: avoid sending binary output to terminal
Date: Fri, 26 May 2017 13:41:12 -0700
reset
You could for instance use tr to filter out anything you want. That's
the whole point of it.
What you cannot do is deal with UTF-8, or anything else where you are
interpreting multiple length encoding. Well, for compression you
have zcat for gzip, and perhaps others, but it seems to me there is a
place in curl to either link to or cooperate with encoding libraries,
which is something you might not always have a good way to do in
shell. Even that though piping would be a more unixy flavor to do it
in.
xc
On Fri, May 26, 2017 at 1:36 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 26 May 2017, Xeno Campanoli via curl-users wrote:
>
>> Typically in the past that would be handled by a pipe filter. People
>> still do that, don't they?
>
>
> How would a "pipe filter" save someone who accidentally sends a jpeg to
> stdout?
>
>> Also, I think a more interesting mechanism would be handling the swamps of
>> heterogeneous encodings, like the 9000 accidental ones from MSW systems.
>
>
> Do you mean "more interesting" as in the current way of detecting accidental
> binary output isn't good enough for this use case, or are you saying you
> want to suggest a better way to detect binary ouput?
>
> --
>
> / daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-26