title: Finding gaps in sequential numbers
body: <p>I don’t do this stuff for a living so forgive me if it’s a simple question (or more complicated than I think).  I‘ve been digging through the archives and found a lot of tips that are close but being a novice I’m not sure how to tweak for my needs or they are way beyond my understanding.</p>
  
  <p>I have some large data files that I can parse out to generate a list of coordinate that are mostly sequential</p>
  
  <pre><code>5
  6
  7
  8
  15
  16
  17
  25
  26
  27
  </code></pre>
  
  <p>What I want is a list of the gaps</p>
  
  <pre><code>1-4
  9-14
  18-24
  </code></pre>
  
  <p>I don’t know <em>perl</em>, <em>SQL</em> or anything fancy but thought I might be able to do something that would subtract one number from the next.  I could then at least <code>grep</code> the output where the difference was not <em>1</em> or <em>-1</em> and work with that to get the gaps.</p>