wput file

2009-04-23 Thread Erik Xavior
Hi
I'm trying to put a file to an ftp site:

wput -v file.txt ftp://USER:passw...@foo.com/public_html/pub/

file.txt is just a normal plain text file.

But it says:

parse-error in escaped character:  is not a hexadecimal character

and it doesn't uploads the file :S

what am I missing?

Thank you for any answer

My aim is to put a file to an ftp server [it would be better, if i could do
it in real time, or like in every 10-30 seconds]


Re: wput file

2009-04-23 Thread Ólafur Jens Sigurðsson
On Thu, Apr 23, 2009 at 10:12:28AM +0200, Erik Xavior wrote:
 Hi
 I'm trying to put a file to an ftp site:
 
 wput -v file.txt ftp://USER:passw...@foo.com/public_html/pub/
 
 file.txt is just a normal plain text file.
 
 But it says:
 
 parse-error in escaped character:  is not a hexadecimal character
 
 and it doesn't uploads the file :S
 
 what am I missing?
 
 Thank you for any answer
 
 My aim is to put a file to an ftp server [it would be better, if i could do
 it in real time, or like in every 10-30 seconds]

try using quotes around the ftp address, like

 wput -v file.txt 'ftp://USER:passw...@foo.com/public_html/pub/'

I am guessing that some characters in the ftp address is being viewed
by your shell as an escape character (which is usually \ and is not
present there) but the '' should disable that.

HTH

Oli


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: wput file

2009-04-23 Thread Florian Kulzer
On Thu, Apr 23, 2009 at 10:12:28 +0200, Erik Xavior wrote:
 Hi
 I'm trying to put a file to an ftp site:
 
 wput -v file.txt ftp://USER:passw...@foo.com/public_html/pub/
 
 file.txt is just a normal plain text file.
 
 But it says:
 
 parse-error in escaped character:  is not a hexadecimal character
 
 and it doesn't uploads the file :S
 
 what am I missing?

If you have a percent sign in PASSWORD then it will be interpreted as an
escape character that is to be followed by a two-digit hexadecimal
number that encodes one character (i.e. the next two characters have to
be members of the set [0-9a-fA-F]):

http://en.wikipedia.org/wiki/Percent-encoding

Try to encode all special characters in PASSWORD according to RFC 3986.

For example, if PASSWORD is :secret%text@ then the encoded version is
%3Asecret%25text%40. If you have the liburi-perl package installed
then you can use perl to do the conversion of all special characters
(see man URI::Escape):

$ perl -e 'use URI::Escape; $encoded = uri_escape(:secret%text@); print 
$encoded\n;'
%3Asecret%25text%40

-- 
Regards,| http://users.icfo.es/Florian.Kulzer
  Florian   |


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: wput file

2009-04-23 Thread Erik Xavior
Wow. It worked :O !!!

Thank you!

ps.: Thank you again :) !!

If you have a percent sign in PASSWORD then it will be interpreted as an
escape character that is to be followed by a two-digit hexadecimal
number that encodes one character (i.e. the next two characters have to
be members of the set [0-9a-fA-F]):

http://en.wikipedia.org/wiki/Percent-encoding

Try to encode all special characters in PASSWORD according to RFC 3986.

For example, if PASSWORD is :secret%text@ then the encoded version is
%3Asecret%25text%40. If you have the liburi-perl package installed
then you can use perl to do the conversion of all special characters
(see man URI::Escape):

$ perl -e 'use URI::Escape; $encoded = uri_escape(:secret%text@); print
$encoded\n;'
%3Asecret%25text%40