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.
好的,所以我知道 grep -rhi,如果找到字符串,它会提取该行,但我想复制整个文件,例如,
文件.txt >
isexample #new iesameplxpele ieamama #new
现在如果我使用 grep -rhi "#new",它只会提取
isexample #new ieamama #new
我想要文件中的所有内容,包括
iesameplxpele
我该怎么做?
当然,.txt 文件的任一行都必须包含#new。