Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jul 2000 17:27:28 -0500
From:      Jon Hamilton <hamilton@pobox.com>
To:        R Joseph Wright <rjoseph@mammalia.org>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: making shell script run in its own directory 
Message-ID:  <20000702222728.27FC416F@woodstock.monkey.net>
In-Reply-To: Your message of "Sun, 02 Jul 2000 15:04:58 PDT." <20000702150458.C66917@manatee.mammalia.org> 

next in thread | previous in thread | raw e-mail | index | archive | help


[ 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000702222728.27FC416F>