title: Grepping with sed from start of the file to given parameter
body: <p>I have a log, that i need to grep from time to time.
  Problem is, the input may not be always correct, and there for when user enters start time, that is not correct, then nothing is grepped.</p>
  
  <p>How can i implement a check, when no start time is set, then the file is grepped from the first line?</p>
  
  <p><code>sed -n '/1217-1337:37/,/&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;:&amp;&amp;/p' file.txt</code> is my original command</p>
  
  <p><code>&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;:&amp;&amp;</code> lets me grep until the end of the file, but in need to change starting point.</p>
  
  <p>Example</p>
  
  <pre><code>row 1: 1111-1111:11 text
  row 2: 1111-1111:11 text 
  row 3: 1111-1111:11 text
  </code></pre>
  
  <p>Desired output when users inputs <code>sed -n '/1017-1337:37/,/&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;:&amp;&amp;/p' file.txt</code></p>
  
  <p>is that all 3 rows are returned to the user</p>
  
  <p>Thanks in advance</p>