cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl does not output the right url content

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Sun, 14 Oct 2012 15:38:42 -0600

At 17:37 +0200 10/14/12, KingTut wrote:
>Hi list, I'm very new to this and i don't know if this is the right place to ask my question.
>
>I'm using curl/7.21.4 on os x 10.7.5
>
>i have a problem when i
>
>check=$(curl url --verbose)
>echo $check
>
>this works fine and outputs the file content to the terminal, but if i change the content of the url and then do it again curl keeps outputting the old content of the url and not the new. if i look in the browser the content is not the same as what curl outputs.
>
>is this because there is some sort of cache of the url? is it possible to clear this? - it seem like if a wait a few minutes it will output the updated content.
>

Hmmm. OS 10.7 and probably a default to bash . . . The $(curl ) format is not common and I'm not sure what it does with curl's outout to the error channel for the progress report and possibly some of the --verbose items. It's possible that the echo $check is running too soon.

curl does not stash content or IP addresses.

curl -o aNewFilepath --verbose "http://abcdefg"
cat aNewFilepath

curl --verbose "http://abcdefg" | cat

Might behave more to your liking.

-- 
--> From the U S of A, the only socialist country that refuses to admit it. <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-14