|
5 | 5 | <link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
|
6 | 6 | <link href="https://learnbyexample.github.io"/>
|
7 | 7 | <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> |
9 | 9 | <id>https://learnbyexample.github.io/atom.xml</id>
|
10 | 10 | <entry xml:lang="en">
|
11 | 11 | <title>Linux Command Line Computing book announcement</title>
|
|
139 | 139 | <entry xml:lang="en">
|
140 | 140 | <title>CLI computation with GNU datamash</title>
|
141 | 141 | <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> |
143 | 143 | <link rel="alternate" href="https://learnbyexample.github.io/cli-computation-gnu-datamash/" type="text/html"/>
|
144 | 144 | <id>https://learnbyexample.github.io/cli-computation-gnu-datamash/</id>
|
145 | 145 | <content type="html"><p><img src="/images/info.svg" alt="info" /> <img src="/images/warning.svg" alt="warning" /> This is a work-in-progress post on the <code>GNU datamash</code> command.</p>
|
|
190 | 190 | </span></code></pre>
|
191 | 191 | <br>
|
192 | 192 | <h2 id="group-by">Group by<a class="zola-anchor" href="#group-by" aria-label="Anchor link for: group-by">🔗</a></h2>
|
193 |
| -<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.</p> |
| 193 | +<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>.</p> |
194 | 194 | <pre data-lang="ruby" style="background-color:#f5f5f5;color:#1f1f1f;" class="language-ruby "><code class="language-ruby" data-lang="ruby"><span style="color:#7f8989;"># here, the first column items are already next to each other
|
195 | 195 | </span><span style="color:#7f8989;"># so, sorting is not needed
|
196 | 196 | </span><span>$ cat toys.txt
|
|
0 commit comments