我曾输入一条curl指令
curl -XPUT 'localhost:9200/apple/emp/0?pretty' -H 'Conent-Type:application/json' -d' {"name":"Andy","age":"41","salary":"25000","hdate":"2022-1-1T12:12:12","title":"clert"}
结果变成这样:
curl -XPUT 'localhost:9200/apple/emp/0?pretty' -H 'Conent-Type:application/json' -d' {"name":"Andy","age":"41","salary":"25000","hdate":"2022-1-1T12:12:12","title":"clert"}
>
>
>
>
我试着敲入eof,exit,bye都无济于事,只能按ctrl+c退出了,自然这条命令也没有得到执行。
请教别人,原来是少了一个引号,导致系统认为命令没有输入完整。
补全后执行curl -XPUT 'localhost:9200/apple/emp/0?pretty' -H 'Conent-Type:application/json' -d' {"name":"Andy","age":"41","salary":"25000","hdate":"2022-1-1T12:12:12","title":"clert"}' 就正常了。
三人行必有我师矣。
END