[{"data":1,"prerenderedAt":136},["ShallowReactive",2],{"post:grep-with-file-type":3},{"id":4,"title":5,"body":6,"date":124,"description":125,"draft":126,"extension":127,"meta":128,"navigation":129,"path":130,"seo":131,"stem":132,"tags":133,"__hash__":135},"posts\u002Fposts\u002Fgrep-with-file-type.md","TIL: TIL: How to Grep For a String In .cfc File Type",{"type":7,"value":8,"toc":121},"minimark",[9,18,58,65,101,108,117],[10,11,12,13,17],"p",{},"Need to change a variable name across 50 files in 10 folders? Here's how to grep for that variable in ",[14,15,16],"code",{},".cfc"," files:",[19,20,25],"pre",{"className":21,"code":22,"language":23,"meta":24,"style":24},"language-bash shiki shiki-themes github-light github-dark","grep -r -i --include \\*.cfc 'wirebox' modules\n","bash","",[14,26,27],{"__ignoreMap":24},[28,29,32,36,40,43,46,49,52,55],"span",{"class":30,"line":31},"line",1,[28,33,35],{"class":34},"sScJk","grep",[28,37,39],{"class":38},"sj4cs"," -r",[28,41,42],{"class":38}," -i",[28,44,45],{"class":38}," --include",[28,47,48],{"class":38}," \\*",[28,50,16],{"class":51},"sZZnC",[28,53,54],{"class":51}," 'wirebox'",[28,56,57],{"class":51}," modules\n",[10,59,60,61,64],{},"What a neat trick! I googled this today and couldn't believe my awesome luck. The last time I had to do this I think I used ",[14,62,63],{},"locate",", like this:",[19,66,68],{"className":21,"code":67,"language":23,"meta":24,"style":24},"locate -type f -name '*.cfc' modules| grep -i 'wirebox'\n",[14,69,70],{"__ignoreMap":24},[28,71,72,74,77,80,83,86,89,93,96,98],{"class":30,"line":31},[28,73,63],{"class":34},[28,75,76],{"class":38}," -type",[28,78,79],{"class":51}," f",[28,81,82],{"class":38}," -name",[28,84,85],{"class":51}," '*.cfc'",[28,87,88],{"class":51}," modules",[28,90,92],{"class":91},"szBVR","|",[28,94,95],{"class":34}," grep",[28,97,42],{"class":38},[28,99,100],{"class":51}," 'wirebox'\n",[10,102,103,104,107],{},"As you can see, the ",[14,105,106],{},"grep --include \\*.cfc"," is a far cleaner syntax.",[10,109,110,111],{},"Once again, here's the SO post with the answer: ",[112,113,114],"a",{"href":114,"rel":115},"https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F12516937\u002Fgrep-but-only-certain-file-extensions",[116],"nofollow",[118,119,120],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":24,"searchDepth":122,"depth":122,"links":123},2,[],"2019-08-15T21:14:01-04:00","Need to change a variable name across 50 files in 10 folders? Here's how to grep for that variable in .cfc files:",false,"md",{},true,"\u002Fposts\u002Fgrep-with-file-type",{"title":5,"description":125},"posts\u002Fgrep-with-file-type",[23,134],"til","-AL-QEOb7e--8MH_sL0RND9jqyYPlBmUdmKgzvOInAI",1790471527770]