title: Linux Bash Script: How to get file without path?
body: <p>I am trying to write a very very simple script in Linux.<br>
  Let me show you the code first:</p>
  
  <pre><code>#!/bin/bash
  # The shell program uses glob constructs and ls
  # to list all entries in testfiles, that have 2
  # or more dots "." in their name.
  
  ls -l /path/to/file/*.*.*
  </code></pre>
  
  <p>When I run this code with <code>bash myscript</code> command, I get something like: /path/to/file/file.with.three.dots  </p>
  
  <p>But I don't want this. I want to show only the file name, not the path.<br>
  Then I tried: </p>
  
  <pre><code>ls -l *.*.*
  </code></pre>
  
  <p>But this time is shows me the files, only if I am inside the /path/to/file/.<br>
  How can I set the path, so when running the script from any place, it will output the name of the files in the /path/to/file/?</p>
  
  <p>Thank you!</p>