线上环境需要定期清理缓存,如下:

[root@LB scripts]# curl http://10.238.74.31/irm/manualDataSyncPage!synchronizeCrmGroupCustomerInfo.html?UserName=004&Password=ZHzg-123   

-bash: !synchronizeCrmGroupCustomerInfo.html?UserName=004: event not found

  “!”在日常命令中可以作为调用history历史记录来使用执行某行内容,在shell里为特殊字符。

在执行curl "http://10.238.74.31/irm/manualDataSyncPage!synchronizeCrmGroupCustomerInfo.html?UserName=004&Password=ZHzg-123"的过程中,发现“!”无法被正常解析,加上转义反斜杠“\”也没用。

[root@LB scripts]# curl http://10.238.74.31/irm/manualDataSyncPage\!synchronizeCrmGroupCustomerInfo.html?UserName=004&Password=ZHzg-123

-bash: !event not found

   后发现在“!”前后加入空格可以解决这个问题,但还不够完美,因为输入的文件字符也是加了空格后的,感觉占用较长地方,现象如下:

[root@LB scripts]# curl "http://10.238.74.31/irm/manualDataSyncPage ! synchronizeCrmGroupCustomerInfo.htmlme=004&Password=ZHzg-123"

   最后尝试双引号与反斜杠同时使用,完美解决问题!具体如下:

[root@LB scripts]# curl "http://10.238.74.31/irm/manualDataSyncPage"\!"syncronizeCrmGroupCustomerInfo.html?UserName=004&Password=ZHzg-123" 

system.title