title: Shell scripting comparison for special charecter
body: <p>Need help in comparing the value of special character ie., - inside shell script.</p>
  <p>Trying to extract initial 4 columns</p>
  <pre><code>command1 |  awk '{print $1, $2, $3, $4}' | while read pid 
  do 
  echo $pid 
  done
  </code></pre>
  <p>getting below output</p>
  <pre><code>TOPIC PARTITION CURRENT-OFFSET  LAG 
  Topic1 0 - 810 
  </code></pre>
  <p>I wanted to include the condition to compare the value of CURRENT-OFFSET if its is equal to - and greater than 500, i need to print message A else message B</p>
  <p>I tried</p>
  <pre><code>command |  awk '{print $1, $2, $3, $4}' | while read pid; do
  if [[ $pid -eq &quot;-&quot; ]] &amp;&amp; [[ $pid -gt 500 ]]; then
  echo &quot;message A&quot;
  else
  echo &quot;message B&quot;
  fi
  done
  </code></pre>
  <p>Not sure how to check the value of - and compare. Need help</p>