
13 Nov
2012
13 Nov
'12
12:32 a.m.
Russell Coker wrote:
On Tue, 13 Nov 2012, "Trent W. Buck" <trentbuck@gmail.com> wrote:
Suggest curl -sf. I'm also surprised the API returns as the body, when IMO the 301 is more logical -- which would be -sfw'%{redirect_url}', possibly with an -I for good measure.
"" to the echo is superfluous. Should have quotes around the $1 though.
Thanks for the suggestion. I've put in quotes. I'm not going to use -sf because I don't plan to use it in scripts at this time, I just want something faster than firing up a new browser window just to visit a web site.
IMO you should be using -f if you're using set -e... Otherwise 4xx don't propagate upwards as errors.