Re: OT: Question to shell script
Hi,
On Fri, Sep 06, 2024 at 12:25:11PM +0200, Hans wrote:
> I have several directories, and in each directory there is a shell script,
> which MUST be started within and from its path.
Is there a reason not to just make these scripts cd to their own
directory so the caller doesn't have to care?
cd "$(dirname "$0")"
I mean, I don't know any other binary on my system that tells me to
run it from a specific directory, so introducing such a requirement
in my own tools would seems like poor user interface, as it is
surprising.
Thanks,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Reply to: