Re: OT: Question to shell script

2024-09-06 Thread Anssi Saari
Hans writes: > What I am exactly want to do: > > I have 5 live-build directories. In each I am starting my own script, which > is > setting variables and so on for the individual build and does some other > things (rennamin and copying the resulted ISO and so on). So you're asking how to do a

Re: OT: Question to shell script

2024-09-06 Thread Hans
What I am exactly want to do: I have 5 live-build directories. In each I am starting my own script, which is setting variables and so on for the individual build and does some other things (rennamin and copying the resulted ISO and so on). As each build must be started within the live-build dir

Re: OT: Question to shell script

2024-09-06 Thread DdB
Am 06.09.2024 um 12:25 schrieb Hans: > Dear list, > > I am stuck with a little problem and know no one, whom I can ask. So I allow > me to ask here. > > I have several directories, and in each directory there is a shell script, > which MUST be started within and from its path. > > Now I wan

Re: OT: Question to shell script

2024-09-06 Thread Andy Smith
Hi, On Fri, Sep 06, 2024 at 07:32:41AM -0400, Greg Wooledge wrote: > On Fri, Sep 06, 2024 at 11:10:16 +, Andy Smith wrote: > > 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")" > > https://mywiki.wo

Re: OT: Question to shell script

2024-09-06 Thread Nicolas George
Andy Smith (12024-09-06): > cd "$(dirname "$0")" … || exit Regards, -- Nicolas George

Re: OT: Question to shell script

2024-09-06 Thread Greg Wooledge
On Fri, Sep 06, 2024 at 11:10:16 +, Andy Smith wrote: > 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")" https://mywiki.wooledge.org/BashFAQ/028

Re: OT: Question to shell script

2024-09-06 Thread Greg Wooledge
On Fri, Sep 06, 2024 at 12:25:11 +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. I'm not clear on what "within and from its path" means here, but let's suppose you mean "I have to cd there first, an

Re: OT: Question to shell script

2024-09-06 Thread Andy Smith
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?