Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您能否建议我执行以下操作的 shell 脚本:我需要搜索文件名包含特定字符串的文件,例如。搜索名称包含子字符串“_ww.txt”的所有文件。然后对这些文件,我需要在顶部添加注释“#found 文件”。
干得好:
find . -name "*_ww.txt" -printf "#found\n%p\n"