title: Shell Input Independent of Spaces Implementation
body: <p>I recently had a programming class where we implemented a shell in Java. One of the requirements was to ensure that parameters could be read from terminal regardless of spaces and tabs etc between them unless within quotes where everything within quotes is taken as is.</p>
  <p>To solve this I wrote a regex and used streams to get the results in an array for further processing.</p>
  <p>But now while preparing for a systems programming course I realized there must be a simpler way to do this? How is this implemented in a typical shell like bash?</p>
  <p>Is it just reading the stream character by character and skipping when it runs into quotes until it finds a matching one?</p>