pages tagged unix http://meng6net.localhost/tag/unix/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 Log statistics for revision control systems http://meng6net.localhost/blog/Log_statistics_for_revision_control_systems/ http://meng6net.localhost/blog/Log_statistics_for_revision_control_systems/ command-line interface computing cvs git mercurial revision control tip unix Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <h2>Find the top committers to a file</h2> <h3>Mercurial:</h3> <pre> <code>$ hg log ./.hgignore | grep user: | sort | uniq -c | sort -r | head -3 5 user: Michael &lt;michael@foomail.com&gt; 3 user: Mary &lt;mary@barmail.com&gt; </code></pre> <h3>Git:</h3> <pre> <code>$ git log ./.gitignore | grep ^Author: | sort | uniq -c | sort -r | head -3 6 Author: Michael &lt;michael@foomail.com&gt; 2 Author: Mary &lt;mary@foomail.com&gt; </code></pre> <h3>CVS:</h3> <pre> <code>$ cvs log ./foo/bar.cpp | grep author | awk '{print $5}' | sort | uniq -c | sort -r | head -3 92 Michael; 72 Mary; </code></pre> /blog/Log_statistics_for_revision_control_systems/#comments How to play a sound after a command is finished http://meng6net.localhost/journal/how_to_play_a_sound_after_a_command_is_finished/ http://meng6net.localhost/journal/how_to_play_a_sound_after_a_command_is_finished/ Bash UNIX command-line tip Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <p>Install <code>espeak</code>:</p> <p>macOS:</p> <pre><code>brew install espeak </code></pre> <p>Ubuntu Linux:</p> <pre><code>sudo apt-get install espeak </code></pre> <p>Run a (time-consuming) command at the UNIX command-line and play a sound when it is finished so you don't need to wait for it to finish or constantly check back:</p> <pre><code>bash$ sleep 10s &amp;&amp; espeak 'Done!' </code></pre>