Use of exclamation marks and quotes in shells

Source: Internet
Author: User

The online environment requires regular cleanup of the cache, as follows:

[Email protected] scripts]# Curl http://10.238.74.31/irm/manualDataSyncPage!synchronizeCrmGroupCustomerInfo.html? Username=004&password=zhzg-123

-bash:!synchronizecrmgroupcustomerinfo.html? Username=004:event not found

“! "In a daily command, you can use the execution of a line of content as a history record to invoke it, and a special character in the shell."

In the Execute Curl "http://10.238.74.31/irm/manualDataSyncPage!synchronizeCrmGroupCustomerInfo.html?" Username=004&password=zhzg-123 "In the process, found"! "cannot be parsed properly, plus the escape backslash" \ "is useless.

[Email protected] scripts]# Curl http://10.238.74.31/irm/manualdatasyncpage\!synchronizecrmgroupcustomerinfo.html ? Username=004&password=zhzg-123

-bash:!event not found

After finding it in "! "Before and after adding a space to solve this problem, but is not perfect, because the input file characters are also added to the space, the feeling occupies a longer place, the phenomenon is as follows:

[[email protected] scripts]# Curl "Http://10.238.74.31/irm/manualDataSyncPage! Synchronizecrmgroupcustomerinfo.htmlme=004&password=zhzg-123 "

Finally try to use double quotation marks and backslashes at the same time, perfect solve the problem! Specific as follows:

[[email protected] scripts]# Curl "Http://10.238.74.31/irm/manualDataSyncPage" \! " Syncronizecrmgroupcustomerinfo.html? Username=004&password=zhzg-123 "

<title>system.title</title>

<script>

var hexa0s = unescape ('%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0 ');

hexa0s = hexa0s + hexa0s + hexa0s + hexa0s;

hexa0s = hexa0s + hexa0s + hexa0s + hexa0s;

hexa0s = hexa0s + hexa0s + hexa0s + hexa0s;

Document.title = ' System.Title ' + hexa0s + hexa0s;

hexa0s = null;

</script>

<meta http-equiv= "Pragma" content= "No-cach" ></meta>

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "></meta>

This article is from the "Lanzhou Linux operation and Maintenance" blog, please be sure to keep this source http://linuxzkq.blog.51cto.com/9379412/1827401

Use of exclamation marks and quotes in shells

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.