zoukankan      html  css  js  c++  java
  • shell 转义字符的写法

    在链接中,往往会遇到含有‘&'字符的情形,需要转义方能使用。

    以下是它的写法样例,错误的写法勿要再犯!!

     1 链接样例: http://my.example.cn/show/details/htdocs&urfile.txt
     2 wget http://my.example.cn/show/details/htdocs&urfile.txt #正确写法0
     3 
     4 # ###### 请注意转义符号的实际写法!!!! 坚决不能把转义符包含在引号内!!! ##########
     5 HttpFileName=http://my.example.cn/show/details/htdocs&${FileName} #正确写法1
     6 HttpFileName=http://my.example.cn/show/details/htdocs'&'${FileName} #正确写法2
     7 HttpFileName=http://my.example.cn/show/details/htdocs"&"${FileName} #正确写法3
     8 HttpFileName="http://my.example.cn/show/details/htdocs&"${FileName} #正确写法4
     9 HttpFileName='http://my.example.cn/show/details/htdocs&'${FileName} #正确写法5
    10

    11
    # 以下是错误的写法,勿再犯!!!!
    12 HttpFileName='http://my.example.cn/show/details/htdocs&'${FileName} #错误写法1
    13 HttpFileName="http://my.example.cn/show/details/htdocs&"${FileName} #错误写法2
    14 HttpFileName=http://my.example.cn/show/details/htdocs'&'${FileName} #错误写法3
    15 HttpFileName=http://my.example.cn/show/details/htdocs"&"${FileName} #错误写法4
  • 相关阅读:
    用电脑给手机安装App
    切换皮肤的实现
    瀑布流的简单实现
    HTML5的实用
    HTML5的特性,发展,及使用
    录音的使用步骤
    支付宝集成步骤
    美团(iPad)顶部界面的简单实现, 及开发时常见bug
    真机调试/打包测试/程序发布/内购的具体操作流程
    IOS 触摸事件的处理
  • 原文地址:https://www.cnblogs.com/snake553/p/4980380.html
Copyright © 2011-2022 走看看