This question already has an answer here:
I want to escape double quotes in bash, I followed the following approach:
#!/bin/bash
this is a \"number\"!
but i need to know if there is another way.
With GNU bash:
echo -e "this is a \x22number\x22"
Output:
this is a "number"
You can enclose the double quotes in single quotes:
echo '"'hola'"'
or alternativela the whole text, including the double quotes:
echo '"hola"'
来源:https://stackoverflow.com/questions/35586627/how-to-escape-double-quotes-in-bash