title: Differences between declare, typeset and local variable in Bash
body: <p>When typing variables in Bash, what is the difference between <code>declare</code> and <code>typeset</code>? When used inside a function: what is the difference between <code>declare</code> and <code>typeset</code> and <code>local</code>?</p>
  
  <p>The only difference I have come across is that typeset is portable to ksh scripts. Other than that, are there any reasons why one should be preferred over the other?</p>
  
  <p>UPDATE: Added <code>local</code> to the question.</p>