Escape characters in batch scripts

后端 未结 3 668
花落未央
花落未央 2021-01-14 11:07

I have the following script to automate uploading a file to a remote server. The problem is that the password I have been given is full of special characters which are killi

3条回答
  •  感动是毒
    2021-01-14 11:43

    FYI, character prefixing is done with ^. So if you were doing an echo with > in the string but writing a file, it will fail without escaping. The syntax would be:

    echo ^ >> foo.txt
    

提交回复
热议问题