title: BASH - getting UID on shell script does not work
body: <p>Hi I have a question about bash.</p>
  
  <p>and I'm new to it.</p>
  
  <p>I made a file named "test.sh" and its contents is</p>
  
  <pre><code>#!/bin/bash
  set -x
  echo $UID
  echo "$UID"
  echo "$(id -u)"
  </code></pre>
  
  <p>and the result is blank!!
  nothing shows up</p>
  
  <p>However, when i just type "echo $UID" on terminal
  it shows "1011"</p>
  
  <p>is there anything i missed for bash?</p>
  
  <p>Please help</p>
  
  <p>UPDATED</p>
  
  <p>bash version is 4.3.11 and I typed "sh test.sh" to execute.</p>
  
  <p>and the result is</p>
  
  <pre><code>+ echo
  
  + echo
  
  + id -u
  + echo 1011
  1011
  </code></pre>
  
  <p>thanks!</p>