Shebang Lines
Dr Eberhard W Lisse
el at lisse.NA
Sun Jan 8 19:34:39 UTC 2023
I didn't mean it just for that script.
I like the bash that is first in my path.
I like the env method for all scripts (perl, bash, python lua and
whatnot).
And, since Apple apparently prefers zsh to bash as the default
shell nowadays it may just be that they will remove it like the
did with python some time in the future.
el
On 08/01/2023 20:04, Stephan Witt wrote:
> Am 07.01.2023 um 19:11 schrieb Richard Kimberly Heck <rikiheck at gmail.com>:
>>
>> On 1/7/23 10:00, Dr Eberhard W Lisse wrote:
>>> I see the
>>>
>>> /Applications/LyX.app/Contents/MacOS/inkscape
>>>
>>> script has
>>>
>>> #!/bin/bash
>>>
>>> as the shebang. Can that please be changed (in all shell
>>> scripts) to read
>>>
>>> #!/usr/bin/env bash
>>
>> Stefan, is this harmless?
>>
>> Anyone else have thoughts about this?
>
> I think this is not needed. I wouldn’t change it.
>
> The only reason to use the #!/usr/bin/env xxx thing is
> portability. But this script is not intended to be portable.
> It’s for macOS.
>
> There are possible drawbacks to use the #!/usr/bin/env xxx
> thing. The least one is the indirection José already mentioned.
> The next one is the inability to say which bash will be
> executed. If $HOME/bin is in PATH and the is some executable
> named bash it is started by the env utility. Do you like that?
>
> See also discussions here:
> https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my
>
> Eberhard, why do you see any real benefit here?
>
> BR,
> Stephan
--
Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist
el at lisse.NA / * | Telephone: +264 81 124 6733 (cell)
PO Box 8421 Bachbrecht \ / If this email is signed with GPG/PGP
10007, Namibia ;____/ Sect 20 of Act No. 4 of 2019 may apply
More information about the lyx-devel
mailing list