title: Get name file in directory Linux
body: <p>I would like to know how I can get filename in my directory only once per occurence :</p>
  <p>Exemple</p>
  <p>I have :</p>
  <p>serveur_20211018_10.txt
  serveur_20211018_11.txt
  serveur_20211018_12.txt
  serveur2_20211018_10.txt
  serveur2_20211018_11.txt
  serveur2_20211018_12.txt</p>
  <p>I would like to get in a Variable the serveur part like :</p>
  <p>serveur and serveur2</p>
  <p>But I have multiple occurence and I can't figure out how to only get one of each</p>
  <p>For now I did :</p>
  <pre><code>find /home/me/2021/*serveur*20211015* -type f -printf &quot;%f\n&quot; | cut -d. -f1
  </code></pre>
  <p>Which give me all the serveur name but multiple time and i want only one of each</p>
  <p>I'm not sure if it's really clear but I tried my best</p>
  <p>Thank you !</p>