Only print the names of files that don´t contain matches. Looking at man ag, we find the -L or -files-without-matches option. The Silver Searcher - Ag (intended function - see bug report)Īs a powerful alternative to grep, you could use the The Silver Searcher - Ag:Ī code searching tool similar to ack, with a focus on speed. I want to find alll the files that contain the word 'hello' grep hello will give me only for the specific directory. Seems like if this isn't going to be fixed soon, the flag should be removed entirely, as it effectively does not work as advertised at all. How do I find the files containing some text. ![]() Citing a comment for the bug report :Īny updates on this? -L completely ignores matches on the first line of the file. Use different approaches presented in this thread instead. ggreer/the_silver_searcher: #238 -files-without-matches does not work properlyĪs there is little progress to the bug report, the -L option mentioned below should not be relied on, not as long as the bug has not been resolved.app/MyApp/Customer/View/Account/orders-trade.phtmlĪs commented by there is an open bug report for Ag regarding the -L/ -files-without-matches flag: app/MyApp/Customer/View/Account/classadd.phtml app/MyApp/Customer/View/Account/studio.phtml app/MyApp/Customer/View/Account/quickcodemanagestore.phtml iname '*.phtml' -exec grep -H -E -o -c 'new Mustache' \ | grep :0$ | sed 's/.$//' phtml giles which do not contain the string new Mustache as these still need to be rewritten.įind. ![]() I want to use Mustache templates instead. phtml files to write out HTML using inline PHP code. ![]() I need to refactor a large project which uses.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |