diff --git a/assets/js/lunr/lunr-store.js b/assets/js/lunr/lunr-store.js index ddb8293..ff4e142 100644 --- a/assets/js/lunr/lunr-store.js +++ b/assets/js/lunr/lunr-store.js @@ -7,7 +7,7 @@ var store = [{ },{ "title": "Stop cat-pipe'ing, You Are Doing It Wrong!", "excerpt":"cat some_file | grep some_pattern I’m sure that you run a command something like above at least once if you are using terminal. You know how cat and grep works and you also know what pipe (|) does. So you naturally combine all of these to make the job done....","categories": [], - "tags": [], + "tags": ["cat","grep","linux","command-line"], "url": "/2022/01/01/stop-cat-pipeing.html", "teaser": null }] diff --git a/feed.xml b/feed.xml index 42971d9..90a3245 100644 --- a/feed.xml +++ b/feed.xml @@ -1,4 +1,4 @@ -Jekyll2022-01-04T17:16:32+00:00https://sahinakkaya.dev/feed.xmlŞahin Akkaya’s Personal PageŞahin Akkaya's personal blog - a perfectionist who likes to tinker everything until it is just right. Get ready to find some sweet tips that will boost your productivity and make you fall in love with your computer.Şahin AkkayaStop cat-pipe’ing, You Are Doing It Wrong!2022-01-01T15:00:00+00:002022-01-01T15:00:00+00:00https://sahinakkaya.dev/2022/01/01/stop-cat-pipeing<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cat </span>some_file | <span class="nb">grep </span>some_pattern +Jekyll2022-01-04T17:31:41+00:00https://sahinakkaya.dev/feed.xmlŞahin Akkaya’s Personal PageŞahin Akkaya's personal blog - a perfectionist who likes to tinker everything until it is just right. Get ready to find some sweet tips that will boost your productivity and make you fall in love with your computer.Şahin AkkayaStop cat-pipe’ing, You Are Doing It Wrong!2022-01-01T15:00:00+00:002022-01-01T15:00:00+00:00https://sahinakkaya.dev/2022/01/01/stop-cat-pipeing<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cat </span>some_file | <span class="nb">grep </span>some_pattern </code></pre></div></div> <p>I’m sure that you run a command something like above at least once if you are using terminal. You know how <code class="language-plaintext highlighter-rouge">cat</code> and <code class="language-plaintext highlighter-rouge">grep</code> works and you also know what pipe (<code class="language-plaintext highlighter-rouge">|</code>) does. So you naturally combine all of these to make the job done. I was also doing it this way. What I didn’t know is that <code class="language-plaintext highlighter-rouge">grep</code> already accepts file as an argument. So the above command could be rewritten as:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">grep </span>some_pattern some_file @@ -59,7 +59,7 @@ util.lua: highlight<span class="o">(</span>group, prope <ul> <li>I figured that out only after using wild card in the second command. So I think it is does not feel natural.</li> <li>It is still not giving the same output. Try and see the difference! <a href="##" title="You will not be able to see which file contains which line. 'cat' will just concatenate all the input.">*</a></li> -</ul>Şahin Akkayacat some_file | grep some_pattern I’m sure that you run a command something like above at least once if you are using terminal. You know how cat and grep works and you also know what pipe (|) does. So you naturally combine all of these to make the job done. I was also doing it this way. What I didn’t know is that grep already accepts file as an argument. So the above command could be rewritten as: grep some_pattern some_fileFirst blog post2021-12-24T23:54:08+00:002021-12-24T23:54:08+00:00https://sahinakkaya.dev/2021/12/24/first-blog-post<style> +</ul>Şahin Akkayacat some_file | grep some_pattern I’m sure that you run a command something like above at least once if you are using terminal. You know how cat and grep works and you also know what pipe (|) does. So you naturally combine all of these to make the job done. I was also doing it this way. What I didn’t know is that grep already accepts file as an argument. So the above command could be rewritten as: grep some_pattern some_fileFirst blog post2021-12-24T23:54:08+00:002021-12-24T23:54:08+00:00https://sahinakkaya.dev/2021/12/24/first-blog-post<style> .ab { font-size: 1.3em; line-height:0;