News for hackers. Stuff that matters.
Re:Why curl defaults to stdout by agumonkey on Monday November 17, 2014 @08:49AM (#8618165)
curl could parse mime type and decide where to push the stream, POC:

    #!/usr/bin/env sh
    
    case $(curl -sLI $1 | grep -i content-type) in
        *text*) echo "curl $1"
                ;;
        *) echo "curl $1 > $(basename $1)"
           ;;
    esac
https://gist.github.com/agumonkey/b85cef0874822c470cc6

Costs of one round trip though.

There are no comments on this comment yet.