You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="s1"> user_cores[$3] += core_count[2] # Accumulate the core count for the user</span>
198
+
<spanclass="s1"> }</span>
199
+
<spanclass="s1"> }</span>
200
+
<spanclass="s1"> }</span>
201
+
<spanclass="s1"> # After processing all lines, print the total cores for each user</span>
202
+
<spanclass="s1"> END {</span>
203
+
<spanclass="s1"> for (user in user_cores) {</span>
204
+
<spanclass="s1"> print user, user_cores[user] # Output user and their total core count</span>
205
+
<spanclass="s1"> }</span>
206
+
<spanclass="s1"> }</span>
207
+
<spanclass="s1">'</span><spanclass="w"></span><spanclass="p">|</span><spanclass="w"></span>sort<spanclass="w"></span><spanclass="c1"># Sort the output alphabetically by username</span>
208
+
</pre></div>
209
+
</div>
210
+
<p>Run the following command to give execution permissions to the script:</p>
0 commit comments