:: Re: [DNG] Python and Virtual Enviro…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Olaf Meeuwissen
日付:  
To: Bob Proulx
CC: dng
題目: Re: [DNG] Python and Virtual Environments
Hi,

Bob Proulx via Dng <dng@???> writes:

> Olaf Meeuwissen wrote:
>> By the way, with the usr-merge mandatory now maintainers seem to be
>> shifting to
>>
>> #!/usr/bin/sh


Sorry! I seem to have spoken relying on bad memory. I cannot find any
evidence of the above on my own machines.
I'd swear I'd seen changes from /bin/something to /usr/bin/something in
my etckeeper logs.

> The UsrMerge folks have created an entire new set of problems to deal
> with now. Unfortunately they have mostly created those problems for
> others rather than for themselves.


ACK.

> Even in a UsrMerge environment one should never use the above but
> should continue to use the standard #!/bin/sh path. The reason people
> are switching to the above is ignorance. They have PATH looking at
> /usr/bin only now and then "type sh" and see /usr/bin/sh and not
> knowing any better use it. Gack!


On Daedalus

# type sh
sh is /bin/sh

On Excalibur

# type sh
sh is /usr/bin/sh

and /bin is a symlink to /usr/bin. I guess it'll just be a matter of
time until the UsrMerge folks insist on removing the symlink ... :-/

> This is why using env is often used and recommended. To at least have
> something portable.
>
>     #!/usr/bin/env sh

>
> That's got to be one of the stranges invocations! But at least it is
> portable and works. So if the UsrMerge advocates can't tolerate using
> paths to /bin then that's an escape route.


Eh, that assumes one's PATH, the places it lists and the first `sh`
found are actually sane. But then again, you should not be required to
cater to morons that are hell-bent on breaking things ;-)

>> > Why we have to deal with /bin/sh instead of just use bash everywhere
>> > in 2025 is another good question, if I never see /bin/sh again I'll be
>> > OK.
>>
>> Just wait until /usr/bin/zsh becomes the norm ;-P
>
> Add one "Gack!" for the zsh. Add another "Gack!" for the /usr/bin
> path to it. :-(


I was just trying to make the point that bash is not the be-all and
end-all of shell scripting.

After two decades of bash at the command prompt, I'm giving zsh a spin
now but I still try to make my own /bin/sh scripts work with whatever
shell is providing that. Be that zsh, bash, dash, ash or even busybox
sh in an Alpine container ...

BTW, I was quite surprised to learn that zsh has been around for three
decades and then some. Actually, it seems to be only one year younger
than bash :-o

Have a nice day,
--
Olaf Meeuwissen