cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: how to write to a file with # in it

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 21 Aug 2005 12:10:43 +0200 (CEST)

On Sun, 21 Aug 2005, Vijoy Varghese wrote:

> curl -o /local/file#name.txt
> http://site.com/prog.pl?file=file%23name.txt&dir=docs/today
>
> I am getting the data, but the name of the file on local machine will be
> '/local/filename.txt', where what I want was '/local/file#name.txt'.
>
> I tried escaping # with back slash, but no use!
>
> Is there any way out of this problem? or is it something like 'I cant have
> files with # in it while using cURL'?

You didn't mention on what system or file system you have problems, but I just
tried on a linux machine nearby:

$ curl -o 'foo#moo' www.haxx.se
   % Total % Received % Xferd Average Speed Time Time Time
Current
                                  Dload Upload Total Spent Left Speed
100 3831 100 3831 0 0 20866 0 --:--:-- --:--:-- --:--:-- 259k

$ ls -l foo#moo
-rw-rw-r-- 1 dast users 3831 Aug 21 12:08 foo#moo

...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-08-21