curl-library
Re: Question on -u in curl
Date: Sat, 3 Mar 2012 11:18:49 +0200
On 2 March 2012 22:48, Steve H Truong <sh2kus_at_yahoo.com> wrote:
> When sending a password to ldap using the –u option if the password as a $
> it is removing it and the
> next character from being passed. We looked at the packet actually going to
> lpda and it is missing
> the $ and then next character. So what it says in the packet trace is 123@#b
> instead of 123@#$ab
>
> -u "domain\659967:123@#$ab"
>
> Any ideas???
>
> > Try to escape the meta character $:
>
>> bash-3.00$ echo "you owe me $a dollars"
>> you owe me dollars
>> bash-3.00$ echo "you owe me \$a dollars"
>> you owe me $a dollars
>
>> So in your case:
>> -u "domain\659967:123@#\$ab"
Yes, this is a Unix shell thing and has nothing to do with curl.
Another way to do this is to use ' instead of " to quote the string:
-u 'domain\659967:123@#$ab'
-- Michael Wood <esiotrot_at_gmail.com> ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2012-03-03