Skip to content

Commit a5cc7c8

Browse files
added link for an example with unique groupby
1 parent 2d4c96e commit a5cc7c8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

atom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
66
<link href="https://learnbyexample.github.io"/>
77
<generator uri="https://www.getzola.org/">Zola</generator>
8-
<updated>2024-06-07T00:00:00+00:00</updated>
8+
<updated>2024-07-03T00:00:00+00:00</updated>
99
<id>https://learnbyexample.github.io/atom.xml</id>
1010
<entry xml:lang="en">
1111
<title>Linux Command Line Computing book announcement</title>
@@ -139,7 +139,7 @@
139139
<entry xml:lang="en">
140140
<title>CLI computation with GNU datamash</title>
141141
<published>2024-04-09T00:00:00+00:00</published>
142-
<updated>2024-04-22T00:00:00+00:00</updated>
142+
<updated>2024-07-03T00:00:00+00:00</updated>
143143
<link rel="alternate" href="https://learnbyexample.github.io/cli-computation-gnu-datamash/" type="text/html"/>
144144
<id>https://learnbyexample.github.io/cli-computation-gnu-datamash/</id>
145145
<content type="html">&lt;p&gt;&lt;img src=&quot;&#x2F;images&#x2F;info.svg&quot; alt=&quot;info&quot; &#x2F;&gt; &lt;img src=&quot;&#x2F;images&#x2F;warning.svg&quot; alt=&quot;warning&quot; &#x2F;&gt; This is a work-in-progress post on the &lt;code&gt;GNU datamash&lt;&#x2F;code&gt; command.&lt;&#x2F;p&gt;
@@ -190,7 +190,7 @@
190190
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
191191
&lt;br&gt;
192192
&lt;h2 id=&quot;group-by&quot;&gt;Group by&lt;a class=&quot;zola-anchor&quot; href=&quot;#group-by&quot; aria-label=&quot;Anchor link for: group-by&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
193-
&lt;p&gt;You can use the &lt;code&gt;-g&lt;&#x2F;code&gt; option to group items based on one or more columns. You can specify an operation such as &lt;code&gt;collapse&lt;&#x2F;code&gt;, &lt;code&gt;sum&lt;&#x2F;code&gt;, &lt;code&gt;mean&lt;&#x2F;code&gt;, &lt;code&gt;count&lt;&#x2F;code&gt; and so on.&lt;&#x2F;p&gt;
193+
&lt;p&gt;You can use the &lt;code&gt;-g&lt;&#x2F;code&gt; option to group items based on one or more columns. You can specify an operation such as &lt;code&gt;collapse&lt;&#x2F;code&gt;, &lt;code&gt;sum&lt;&#x2F;code&gt;, &lt;code&gt;mean&lt;&#x2F;code&gt;, &lt;code&gt;count&lt;&#x2F;code&gt; and so on. See &lt;a href=&quot;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;q&#x2F;779049&#x2F;109046&quot;&gt;Grouping rows by categories avoiding repetition&lt;&#x2F;a&gt; for an example with &lt;code&gt;unique&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
194194
&lt;pre data-lang=&quot;ruby&quot; style=&quot;background-color:#f5f5f5;color:#1f1f1f;&quot; class=&quot;language-ruby &quot;&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span style=&quot;color:#7f8989;&quot;&gt;# here, the first column items are already next to each other
195195
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7f8989;&quot;&gt;# so, sorting is not needed
196196
&lt;&#x2F;span&gt;&lt;span&gt;$ cat toys.txt

cli-computation-gnu-datamash/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</span><span style=color:#5597d6;>Maths</span><span>,</span><span style=color:#b3933a;>100</span><span>,</span><span style=color:#b3933a;>97</span><span>,</span><span style=color:#b3933a;>78</span><span>,</span><span style=color:#b3933a;>60
3232
</span><span style=color:#5597d6;>Physics</span><span>,</span><span style=color:#b3933a;>100</span><span>,</span><span style=color:#b3933a;>98</span><span>,</span><span style=color:#b3933a;>83</span><span>,</span><span style=color:#b3933a;>70
3333
</span><span style=color:#5597d6;>Chemistry</span><span>,</span><span style=color:#b3933a;>100</span><span>,</span><span style=color:#b3933a;>95</span><span>,</span><span style=color:#b3933a;>80</span><span>,</span><span style=color:#b3933a;>90
34-
</span></code></pre><br><h2 id=group-by>Group by<a aria-label="Anchor link for: group-by" class=zola-anchor href=#group-by>🔗</a></h2><p>You can use the <code>-g</code> option to group items based on one or more columns. You can specify an operation such as <code>collapse</code>, <code>sum</code>, <code>mean</code>, <code>count</code> and so on.<pre class=language-ruby data-lang=ruby style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-ruby data-lang=ruby><span style=color:#7f8989;># here, the first column items are already next to each other
34+
</span></code></pre><br><h2 id=group-by>Group by<a aria-label="Anchor link for: group-by" class=zola-anchor href=#group-by>🔗</a></h2><p>You can use the <code>-g</code> option to group items based on one or more columns. You can specify an operation such as <code>collapse</code>, <code>sum</code>, <code>mean</code>, <code>count</code> and so on. See <a href=https://unix.stackexchange.com/q/779049/109046>Grouping rows by categories avoiding repetition</a> for an example with <code>unique</code>.<pre class=language-ruby data-lang=ruby style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-ruby data-lang=ruby><span style=color:#7f8989;># here, the first column items are already next to each other
3535
</span><span style=color:#7f8989;># so, sorting is not needed
3636
</span><span>$ cat toys.txt
3737
</span><span>car blue

sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</url>
3333
<url>
3434
<loc>https://learnbyexample.github.io/cli-computation-gnu-datamash/</loc>
35-
<lastmod>2024-04-22</lastmod>
35+
<lastmod>2024-07-03</lastmod>
3636
</url>
3737
<url>
3838
<loc>https://learnbyexample.github.io/cli-text-processing-awk-announcement/</loc>

0 commit comments

Comments
 (0)