命令提示符有异常的引号和大括号 [英] Command prompt having trouble escaping quotes and braces

查看:395
本文介绍了命令提示符有异常的引号和大括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在命令提示符下执行以下行:

I am trying to execute the following line in command prompt:

curl -X POST -d '{ "method" : "account_info", "params" : [ { "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"} ] }' http://s1.ripple.com:51234

但是,我得到以下内容:

However, I get the following:

curl: (6) Could not resolve host: method
curl: (7) Failed connect to :80; No error
curl: (6) Could not resolve host: account_info,
curl: (6) Could not resolve host: params
curl: (7) Failed connect to :80; No error
curl: (3) [globbing] illegal character in range specification at pos 2
curl: (3) [globbing] unmatched brace at pos 2
curl: (6) Could not resolve host: account
curl: (7) Failed connect to :80; No error
curl: (3) [globbing] unmatched close brace/bracket at pos 35
curl: (3) [globbing] unmatched close brace/bracket at pos 1
curl: (3) [globbing] unmatched close brace/bracket at pos 1
unable to parse request

我在windows上,错误与引号,大括号和globbing有关。我尝试使用反斜杠前面的引号,没有运气。

I am on windows, and the error has to do with quotes, braces, and globbing. I tried escaping quotes by preceding them with a backslash, with no luck.

我确信我只需要以正确的方式逃脱正确的东西,很难做到这一点。

I am sure I just need to escape the right stuff, in the right way, but am having a hard time doing it. Some help would be highly appreciated.

推荐答案

尝试这样:

curl -X POST -d "{ \"method\" : \"account_info\", \"params\" : [ { \"account\" : \"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh\"} ] }" http://s1.ripple.com:51234

这篇关于命令提示符有异常的引号和大括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆