問(wèn)題描述:
"!" 在 bash 中另有含義,因此如果想要請(qǐng)求的主機(jī)的用戶名或密碼中含有 "!" 時(shí),使用以下命令:
curl -k -u USERNAME:PASSWORD https://MANAGER/api/v1/logical-ports
就會(huì)報(bào)錯(cuò):
-bash: !xx: event not found
需要用反斜杠 "\" 為該字符轉(zhuǎn)義。
The -k (or --insecure) option is to turn off curl's verification of the certificate.
Note that it must appear ahead of -u.