title: how to get last line first 2 character of a file in linux
body: <p>I have  files containing below format, generated by another system</p>
  
  <pre><code> 12;453453;TBS;OPPS;
   12;453454;TGS;OPPS;
   12;453455;TGS;OPPS;
   12;453456;TGS;OPPS;
   20;787899;THS;CLST;
   33;786789;
  </code></pre>
  
  <p>i have to check the last line contains 33 , then have to continue to copy the file/files to other location. else discard the file.</p>
  
  <p>currently I am doing as below</p>
  
  <pre><code>tail -1 abc.txt &gt;&gt; c.txt
  awk '{print substr($0,0,2)}' c.txt
  </code></pre>
  
  <p>then if the o/p is saved to another variable and copying. 
  <strong>Can anyone suggest any other simple way.</strong></p>
  
  <p>Thank you!</p>
  
  <p>R/</p>