X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Reg: dirname Date: Fri, 11 Apr 2008 13:51:37 +0530 Message-ID: From: "Manjunatha Appaji Gowda" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m3B8MMM5027179 Hi all, i have some problem with $0 for example my script looks like this #!/bin/sh echo `dirname "$0"` i m keeping this script in this path c:/users/test/script if i do sh -x c:/users/test/script from cygwin (bash shell) ideally results should look like in below $ sh -x c:/users/test/test ++ dirname c:/users/test/test + echo c:/users/test/ c:/users/test/ for some reason in some machines results are showing like in below $ sh -x c:/users/test/test ++ dirname /cygdrive/c/users/test/test + echo /cygdrive/c/users/test /cygdrive/c/users/test please help on this Manjunath -- 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/