<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Terminal on Notes</title>
    <link>https://www.simplicidade.org/tags/terminal/index.xml</link>
    <description>Recent content in Terminal on Notes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>melo@simplicidade.org (Pedro Melo)</managingEditor>
    <webMaster>melo@simplicidade.org (Pedro Melo)</webMaster>
    <copyright>(c) 2016 Pedro Melo.</copyright>
    <atom:link href="/tags/terminal/index.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsuhhubbub.superfeedr.com/"/>
    
    <item>
      <title>Tip: notify long running terminal jobs via Growl</title>
      <link>https://www.simplicidade.org/notes/2005/10/01/tip-notify-long-running-terminal-jobs-via-growl/</link>
      <pubDate>Sat, 01 Oct 2005 20:10:18 +0000</pubDate>
      <author>melo@simplicidade.org (Pedro Melo)</author>
      <guid>https://www.simplicidade.org/notes/2005/10/01/tip-notify-long-running-terminal-jobs-via-growl/</guid>
      <description>&lt;p&gt;Sometimes you need to run some script or program that will take a long time.&lt;/p&gt;

&lt;p&gt;What I usually do is opening a new window, start the script, and then minimize or send to the back that terminal, leaving a small corner visible to serve as a status. I could glance to the visible corner and look for the prompt to see if had ended.&lt;/p&gt;

&lt;p&gt;Now, I use this little super simple script (could also be a bash alias, probably):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; #!/bin/sh
 #
 # Runs script, and prints a notification with growl when it finishes
 #

 $*
 growlnotify -m &amp;quot;Script &#39;$*&#39; completed&amp;quot; -s &amp;quot;Background script notification&amp;quot; &amp;amp;
 # --script ends here--
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My version is called &lt;code&gt;n&lt;/code&gt;, just &lt;code&gt;n&lt;/code&gt;. So I can type &lt;code&gt;n update_mini_cpan&lt;/code&gt; and have a nice notification when it finishes via Growl.&lt;/p&gt;

&lt;p&gt;Test with &lt;code&gt;n ls -la&lt;/code&gt; if you want.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>