title: sed/awk specify ranges in regex
body: <p>I have a file list output like this:</p>
  
  <pre><code>/path/F201405151800
  /path/F201405151900
  /path/F201405152000
  /path/F201405152100
  </code></pre>
  
  <p>I piped this output to sed and used the following syntax:</p>
  
  <pre><code>sed -n '/F.\{8\}'$var1'/,/F.\{8\}'$var2'/p'
  </code></pre>
  
  <p>$var1 and $var2 are user inputs and as it can be seen, they refer to hours of the day in my files list. The above syntax works perfectly if $var1 and $var2 values are found. But if the value of $var1 is 16, and $var2 is 19 sed will not output anything because 16 will not be found in the above file list range.</p>
  
  <p>A solution to this was:</p>
  
  <pre><code>sed -n '/F.\{8\}1[6-9]/p'
  </code></pre>
  
  <p>...which works but the issue I am facing now is how to specify double digit ranges in order to include something like: 16-20. I tried globbing between single quotes (like I'm doing with variables) like this:</p>
  
  <pre><code>sed -n '/F.\{8\}'{16..21}'/p'
  </code></pre>
  
  <p>...but the output I get is:</p>
  
  <pre><code>sed: can't read /F.\{8\}16/p: No such file or directory
  sed: can't read /F.\{8\}17/p: No such file or directory
  sed: can't read /F.\{8\}18/p: No such file or directory
  sed: can't read /F.\{8\}19/p: No such file or directory
  sed: can't read /F.\{8\}20/p: No such file or directory
  sed: can't read /F.\{8\}21/p: No such file or directory
  </code></pre>
  
  <p>I don't really need to use sed, I explored some options with awk but could not obtain what I want, the main issue being that I can't figure out how to specify a regex RS so that I have the hours block as an awk field and do some conditions like </p>
  
  <pre><code>'$2 &gt; 16 &amp;&amp; $2 &lt; 21 {print}'
  </code></pre>