cmd命令行(二)
echo 输出 echo, // 输出一个"回车换行",空白行 echo off // 后续所有命令在执行前,不打印出命令的内容 echo on // 后续所有命令在执行前,打印出命令的内容 echo 123 // 输出123到终端屏幕 echo "Hello World!!!" // 输出Hello World!!!到终端屏幕 echo 456 > a.txt // 输出456的字符串到当前目录中的a.txt文件中(以覆盖的方式) find 文件中搜索字符串 例:find /N /I "6" q.txt // 在q.txt文件中忽略大小写查找6字符串,并带行号显示查找后的结果 例:find /C "6" q.txt // 只显示在q.txt文件中查找到6字符串的次数 例:find /V "exe" 1.txt // 显示未包含1.txt文件中未包含exe字符串的行 findstr 文件中搜索字符串 例:findstr "hello world" q.txt // 在q.txt文件中搜索hello或world 例:findstr /c:"hello world" q.txt // 在q.txt文件中搜索hello world 例:findstr /c:"hello world" q.txt nul // 在q.txt文件中搜索hello world,并在每行结果前打印出q.txt: