title: How to obtain the first letter in a Bash variable?
body: <p>I have a Bash variable, <code>$word</code>, which is sometimes a word or sentence, e.g.:</p>
  
  <pre><code>word="tiger"
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>word="This is a sentence."
  </code></pre>
  
  <p>How can I make a new Bash variable which is equal to only the first letter found in the variable? E.g., the above would be:</p>
  
  <pre><code>echo $firstletter
  t
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>echo $firstletter
  T
  </code></pre>