[meder@kat directoryName]$ grep -RlI "send you instr" *
application/views/scripts/auth/forgot.phtml
[meder@kat directoryName]$
Is there a quick hack to referencing the only result? Can I开发者_Go百科 somehow pipe it to vim?
If you're OK with it opening all results in Vim, you could just do:
vim $(grep -RlI "send you instr" *)
You'll be put into a buffer with the first matching file, and can navigate to the others with :next
.
Open a new file in vim and insert the found filename as a text:
grep -RlI "send you instr" * | vim -
Open the found file directly in vim:
grep -RlI "send you instr" * | xargs vim
vim `grep -RlI "send you instr" *`
精彩评论