-2

I need to write a " into a string, because a script needs it in the format, but I do not know how to do it.

Does it need to be marked as a character?

phuclv
  • 37,963
  • 15
  • 156
  • 475
  • 2
    Have you ever heard of escaping characters? – Geshode Aug 30 '18 at 07:17
  • Possible duplicate of [How to properly escape quotes in powershell v2?](https://stackoverflow.com/questions/44637110/how-to-properly-escape-quotes-in-powershell-v2) – Clijsters Aug 30 '18 at 07:52
  • Possible duplicate of [Escaping quotes and double quotes](https://stackoverflow.com/questions/18116186/escaping-quotes-and-double-quotes) – Manu Aug 30 '18 at 09:09

1 Answers1

3

You need to double it, put it inside a single quote or escape it with `

echo "This will output a double quote """
echo '"This will also be put in double quotes"'
echo "`"This is another way to quote`""

For more string quoting basics refer to the official documentation

Hexaholic
  • 3,299
  • 7
  • 30
  • 39
phuclv
  • 37,963
  • 15
  • 156
  • 475