title: Variable contains backslash not working in sed bash
body: <p>Our log pattern is in the following format dd/Mon/year:time(22/Feb/2018:13). </p>
  
  <p>Goal is we want to find logs between 2 different times. We used sed to get the log between 2 times.</p>
  
  <pre><code> sed -n '/22\/Feb\/2018:13:/,/22\/Feb\/2018:16/p' /var/log/apache2/domlogs/access.log
  </code></pre>
  
  <p>The above command is working manually. We created a two variables called <strong>LAST</strong> and <strong>NOW</strong> in the script and assigned the date variables as mentioned below.</p>
  
  <pre><code>NOW="22/Feb/2018:16"
  
  LAST="22/Feb/2018:13"
  </code></pre>
  
  <p>We have used the following sed commands to print the same output however it doesn't help us to print the same output.</p>
  
  <pre><code>sed -n '/'"$LAST"'/'"$NOW"'/p' /var/log/apache2/domlogs/access.log
  </code></pre>
  
  <p>The command gives the below error
  sed: -e expression #1, char 5: unknown command: `F'</p>
  
  <p>If we use normal string for <strong>LAST</strong> and <strong>NOW</strong> then above command works fine. Only problem is if the variable contains / in the input</p>