On 5/21/2016 3:10 AM, Kman Devnull wrote:
On Tue, May 17, 2016 at 3:34 PM, Kman Devnull <[email protected] <mailto:[email protected]>> wrote:

    Hi,
    I was planning to convert some of my current libcurl code into a
    bash script.

    Current code looks something like this -
    https://curl.haxx.se/libcurl/c/getinmemory.html

    So, if I were to convert it to bash script - would the usage of
    curl be something like this in bash script  -
    http://www.yilmazhuseyin.com/blog/dev/curl-tutorial-examples-usage/

    Would appreciate if you have some examples to point me to. Many
    thanks!


You have to be more specific about what you are trying to do. If you want to retrieve a webpage using the curl tool it's as simple as

curl http://example.com

save it to a file:

curl -o out http://example.com

Read the manpage [1] and look at the cheat sheet [2]. That website you linked to suggests using --request (-X) but there's usually no reason for that [3]. If you need more help after you read all those things ask the curl tool mailing list curl-users [4].


[1]: http://curl.haxx.se/docs/manpage.html
[2]: https://bagder.github.io/curl-cheat-sheet/http-sheet.html
[3]: https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/
[4]: https://cool.haxx.se/mailman/listinfo/curl-users

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to