Re: Outputting URL components

Rich Gray via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
Daniel Stenberg via curl-users wrote:
> Basically helping to split up the URL. Something that is very tricky 
> to do in for example an ordinary shell script.
If it's not already possible, it seems like it would be useful to give curl 
a URL solely for the purpose of write outs (no transfer operation).  Curl 
would be able to function as a URL parser for scripts.

   curl --noop http://www.example.com:123/test -w'%{url.port}\n'

would echo out 123 on a line by itself.

--noop could also be useful for testing a curl command line for validity 
without doing a transfer.  (Could this speed up some tests?)


- Rich
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.