title: Bash grep command starts with or ends with
body: <p>I'm after a command that will return results based on a pattern match that starts with or ends with a the given pattern.</p>
  
  <p>This is what i have so far.</p>
  
  <pre><code>"cat input.txt | grep "^in|in$"
  </code></pre>
  
  <p>My main problem is that i cant get the (or) to work but i can get them to work individually.</p>
  
  <p>Thanks for your help in advance.</p>