title: Concatenate strings inside bash script (different behaviour from shell)
body: <p>I'm trying some staff that is working perfectly when I write it in the regular shell, but when I include it in a bash script file, it doesn't.
  First example:</p>
  
  <pre><code>m=`date +%m`
  m_1=$((m-1))
  echo $m_1
  </code></pre>
  
  <p>This gives me the value of the last month (actual minus one), but doesn't work if its executed from a script.</p>
  
  <p>Second example:</p>
  
  <pre><code>m=6
  m=$m"t"
  echo m
  </code></pre>
  
  <p>This returns "6t" in the shell (concatenates $m with "t"), but just gives me "t" when executing from a script.</p>
  
  <p>I assume all these may be answered easily by an experienced Linux user, but I'm just learning as I go.</p>
  
  <p>Thanks in advance.</p>