title: How to include variables in the sed command?
body: <pre><code>grep -F "$name" -A1000 filename | sed -n '1p;19p;24p'
  </code></pre>
  
  <p>Assume <code>let a=10,b=20,c=30</code>.In the above grep command can I use <code>'$ap;$bp;$cp'</code> instead of <code>'1p;19p;24p'</code>?</p>
  
  <p>Another thing, I've given as <code>-A1000</code>. Which implies that starting from 1p it considers till 1000 line , right? I need to search throughout file without giving the number.</p>