title: Bash extracting file basename from long path
body: <p>In <code>bash</code> I am trying to <code>glob</code> a list of files from a directory to give as input to a program. However I would also like to give this program the list of filenames</p>
  
  <pre><code>files="/very/long/path/to/various/files/*.file"
  </code></pre>
  
  <p>So I could use it like that. </p>
  
  <pre><code>prompt&gt; program -files $files -names $namelist
  </code></pre>
  
  <p>If the <code>glob</code> gives me :</p>
  
  <pre><code>/very/long/path/to/various/files/AA.file /very/long/path/to/various/files/BB.file /very/long/path/to/various/files/CC.file /very/long/path/to/various/files/DD.file /very/long/path/to/various/files/ZZ.file
  </code></pre>
  
  <p>I'd like to get the list of AA BB CC DD ZZ to feed my program without the long pathname and file extension. 
  However I have no clue on how start there ! Any hint much appreciated ! </p>