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