From owner-freebsd-questions Sun Jul 2 15:27:38 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailgw02.execpc.com (mailgw02.execpc.com [169.207.3.78]) by hub.freebsd.org (Postfix) with ESMTP id C524037B6AF for ; Sun, 2 Jul 2000 15:27:35 -0700 (PDT) (envelope-from hamilton@pobox.com) Received: from woodstock.monkey.net (d101.as15.nwbl0.wi.voyager.net [169.207.134.229]) by mailgw02.execpc.com (8.9.1) id RAA15436; Sun, 2 Jul 2000 17:27:34 -0500 Received: from pobox.com (localhost [127.0.0.1]) by woodstock.monkey.net (Postfix) with ESMTP id 27FC416F; Sun, 2 Jul 2000 17:27:28 -0500 (CDT) X-Mailer: exmh version 2.1.1 10/16/1999 To: R Joseph Wright Cc: freebsd-questions@FreeBSD.org Subject: Re: making shell script run in its own directory In-reply-to: Your message of "Sun, 02 Jul 2000 15:04:58 PDT." <20000702150458.C66917@manatee.mammalia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 02 Jul 2000 17:27:28 -0500 From: Jon Hamilton Message-Id: <20000702222728.27FC416F@woodstock.monkey.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ cd in a shell script so its cwd is the script directory ] } > > Though generally I consider this kind of thing bad practice. } > } > It works! Can yourself on that last point? } ^^^^^^^^ } Oops, I meant to say "Can you explain yourself on that last point?" In general, a shell script shouldn't behave differently just because someone moves it or makes a link to it that's in a different directory. There are circumstances where making a script work that way is the least of the available evils, I suppose. -- Jon Hamilton hamilton@pobox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message