如何逃脱的回声"用于在文件中存储? [英] How do escape echo " for storing in a file?

查看:115
本文介绍了如何逃脱的回声"用于在文件中存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道:回声等等等等> file.txt的的作品。
回声方式> file.txt的工程太

I know : echo "blah blah" >file.txt works. and that echo "" >file.txt works too.

但是,如果我想回应只有一个(双引号)在文件中。

but, what if I want to echo only ONE " (double quote) in a file.

回声> file.txt的不起作用,是有可能做的一行命令

echo ">file.txt doesn't work, is it possible doing it in a one line command?

推荐答案

有关Windows外壳程序转义字符 ^ ,所以:

The escape character for the Windows shell is ^, so:

echo ^" > file.txt

这篇关于如何逃脱的回声"用于在文件中存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆