简体   繁体   中英

Search line by line in file for a string

I need to search line by line to ensure a word appears on every line of a .text file. I am currently working on a batch script so it would be ideal if batch has the capabilities to do this. Otherwise, what are my options?

echo Lines that have NOT the search word:
findstr /N /V /C:"theWord" theFile.txt

为什么不在.txt文件上使用c ++,然后将文件转换为批处理文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM