Skip to content

Jean-Pierre Lambelet

Il n'y a pas de questions bêtes

  • Programming tips
  • General tips
  • About
  • EN
    • FR
    • EN
MacBook Pro affichant un éditeur de code

Photo de Emile Perron sur Unsplash

Bash – How to know where the script is

August 17, 2026July 27, 2016 by Jean-Pierre Lambelet

To find out in which folder the script being executed is located, no matter where it is called from

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Categories Bash
PHP – NGINX: How to pass the PHP_AUTH_USER and PHP_AUTH_PW variables
Docker: How to use nano

About

Jean-Pierre Lambelet is a Swiss web developer. This blog collects tips and tutorials on generative AI and RAG chatbots, PHP and Symfony, PostgreSQL and Docker.

Recent Posts

  • An LLM crawler that said “ok” for 12 days and extracted nothing
  • Docker – pgvector – Run PostgreSQL with pgvector in Docker Compose
  • PostgreSQL – pgvector – Keep the ivfflat index when you give results a weight
  • Stopping a RAG chatbot from presenting stale information as current
  • Giving a chatbot live weather through LLM tool calling
  • FR
  • EN

Recent Posts

  • An LLM crawler that said “ok” for 12 days and extracted nothing
  • Docker – pgvector – Run PostgreSQL with pgvector in Docker Compose
  • PostgreSQL – pgvector – Keep the ivfflat index when you give results a weight
© 2026 Jean-Pierre Lambelet • RSS feed • Privacy Policy • Ads fund this blog,