title: wildcard character not working while running ls in script
body: <p>I am writing a script which will pick the last created file for the given process instance.</p>
  
  <p>The command I use in my script is</p>
  
  <pre><code>CONSOLE_FILE=`ls -1 "$ABP_AJTUH_ROOT/console/*${INSTANCE}*" | tail -1`
  </code></pre>
  
  <p>but while the script is getting executed, the above command changes to </p>
  
  <pre><code>ls -1 '....../console/*ABP*'
  </code></pre>
  
  <p>because of the single quotes, <code>*</code> is not being treated as a wildcard character and it is giving output like:</p>
  
  <pre><code>ls -1 $ABP_AJTUH_ROOT/console/*${INSTANCE}* | tail -1
  + ls -1 '/tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/*UHMF_RT_1085*'
  + tail -1
  ls: /tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/*UHMF_RT_1085*: No such file or directory
  + CONSOLE_FILE=''
  </code></pre>
  
  <hr>
  
  <p>it is working on command line after removing ' from the command but not working while using in script as mentioned above</p>
  
  <pre><code>tc1@gircap01!DEV:devtc1/Users/RB/AIMOS_CLEANUP_CANSUB&gt; ls -l '/tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/*UHMF_RT_1085*'
  ls: /tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/*UHMF_RT_1085*: No such file or directory
  devtc1@gircap01!DEV:devtc1/Users/RB/AIMOS_CLEANUP_CANSUB&gt; ls -l /tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/*UHMF_RT_1085*
  -rw-r--r-- 1 devtc1 aimsys  72622 Feb 17 20:55 /tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/ADJ1UHMINFUL_UHMF_RT_1085_console_20150217_205519.log
  -rw-r--r-- 1 devtc1 aimsys 177039 Feb 17 21:02 /tcusers1/dev/aimsys/devtc1/var/dev/projs/ajtuh/console/ADJ1UHMINFUL_UHMF_RT_1085_console_20150217_210203.log
  </code></pre>