title: Unix/Linux and MQ scripts explaination
body: <pre><code>echo "DISPLAY QL($Queue) CURDEPTH" \
      | runmqsc Queue_Managr \
      | grep 'CURDEPTH(' \
      | sed 's/.*CURDEPTH//' \
      | tr -d '()'.
  </code></pre>
  
  <p>Can anyone suggest how this script works? Actually this command displays the current depth value for a particular Q_Manager for a particular queue.</p>
  
  <p>I understand <code>"DISPLAY QL($Queue) CURDEPTH" | runmqsc Queue_Managr"</code> - this command displays the queue name and curdepth{value}.</p>
  
  <p>But I don't understand <code>grep 'CURDEPTH(' | sed 's/.*CURDEPTH//' | tr -d '()</code>. How does this command work?</p>