[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a difference between $BASH_SOURCE and $0 in portability ?
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: is there a difference between $BASH_SOURCE and $0 in portability ? |
Date: |
Thu, 17 Feb 2022 00:25:49 +0100 |
On Wed, Feb 16, 2022 at 11:53 PM Lawrence Velázquez <vq@larryv.me> wrote:
> On Wed, Feb 16, 2022, at 5:37 PM, Alex fxmbsw7 Ratchev wrote:
> > i ask cause BASH_ isnt maybe availabe, so i must use $0 to exec with new
> > bash again ( os x ) .. whats the difference .. ( of $0 vs BASH_SOURCE ) ?
>
> https://mywiki.wooledge.org/BashFAQ/028#arg0
>
> (I fully expect you to object that this is "invalid", but whatever.)
>
yea ehm the written english story text there doesnt tell me anything, or an
answer to my quesiton
i suppose, as earlier habit, $0 is the filename, just like $BASH_SOURCE,
its up to the brain to make ONE if for if a slash is there but i dont need
it in this mac os x case at all i just need 'exec bash "$0"' and wanted to
know if thats valid
>
> --
> vq
>