title: countdown in shell without seq or jot
body: <p>I'm trying to make a countdown timer script that takes a number of seconds as <code>$1</code>, then counts down to zero, showing the current remaining seconds as it goes.</p>
  
  <p>The catch is, I'm doing this on an embedded box that doesn't have <code>seq</code> or <code>jot</code>, which are the two tools I know can generate my list of numbers.</p>
  
  <p>Here's the script as I have it working on a normal (non-embedded) system:</p>
  
  <pre><code>#!/bin/sh
  
  for i in $(/usr/bin/jot ${1:-10} ${1:-10} 1); do
      printf "\r%s " "$i"
      sleep 1
  done
  
  echo ""
  </code></pre>
  
  <p>This works in FreeBSD.  If I'm on a Linux box, I can replace the <code>for</code> line with:</p>
  
  <pre><code>for i in $(/usr/bin/seq ${1:-10} -1 1); do
  </code></pre>
  
  <p>for the same effect.</p>
  
  <p>But what do I do if I have no <code>jot</code> OR <code>seq</code>?</p>