Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <000701c50c70$37411610$713d480c@arthurfxgimkdx> From: "Arthur Schwarz" To: Subject: Using PWD Date: Sun, 6 Feb 2005 09:20:53 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I'm trying to find the directory of an executing bash script and am having very limited success. For example(s): 1. /script.sh 2. source /script.sh 3. bash /script.sh I can find the correct only for the first example (dirname $0). PWD (of course) only works when == ./. The other two cases I can't seem to get to work. Any idea how to get the in examples 2 and 3? art -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/