![在文件中打印双引号](https://linux22.com/image/944704/%E5%9C%A8%E6%96%87%E4%BB%B6%E4%B8%AD%E6%89%93%E5%8D%B0%E5%8F%8C%E5%BC%95%E5%8F%B7.png)
我想将其打印到文件中
echo "hello world "today"" > /tmp/file.log
导致/tmp/file.log
hello world "today"
答案1
您可以通过多种方式实现此目的
$ echo "hello world \"today\"" > /tmp/file.log
$ cat /tmp/file.log
hello world "today"
$ echo 'hello world "today"' > /tmp/file.log
$ cat /tmp/file.log
hello world "today"