title: How can I print all the characters until a certain pattern (excluding the pattern itself) using grep/awk/sed?
body: <p>For example</p>
  
  <pre><code>echo "abc-1234a :" | grep &lt;do-something&gt;
  </code></pre>
  
  <p>to print only <code>abc-1234a</code></p>