Ron Guilmet via plug on 1 Jun 2023 15:27:33 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] zsh: command not found:


Yes that is correct, under Mac home is under Users. I confused that.

> On Jun 1, 2023, at 2:10 PM, Walt Mankowski via plug <plug@lists.phillylinux.org> wrote:
> 
> Agreed. The home directories are under /Users on macOS, whereas on
> Linux they're under /home.
> 
> On Thu, Jun 01, 2023 at 01:23:58PM -0400, Aaron Mulder via plug wrote:
>> I don’t think that’s it.  I think what fixed it is changing /home/ron/bin
>> to ~/bin because your home directory isn’t under /home on macOS.  I think
>> if you change it to /home/ron/bin:$PATH then it will stop working.
>> 
>> Thanks,
>>     Aaron
>> 
>> On Thu, Jun 1, 2023 at 1:16 PM Ron Guilmet via plug <
>> plug@lists.phillylinux.org> wrote:
>> 
>>> No my issue ended up settling the path incorrectly. I didn’t append the
>>> path variable. I put the path variable first. It seemed to after appending
>>> the path variable after the path for whatever reason
>>> 
>>> Sent from my iPhone
>>> 
>>>> On Jun 1, 2023, at 11:20 AM, Walt Mankowski via plug <
>>> plug@lists.phillylinux.org> wrote:
>>>> 
>>>> I was wondering about that too, but I'd forgotten that he said he was
>>>> on macOS. That's got to be what was causing his error!
>>>> 
>>>> Walt
>>>> 
>>>>> On Thu, Jun 01, 2023 at 09:43:41AM -0400, Aaron Mulder via plug wrote:
>>>>> Wait, so the original error was using /home/ron/bin instead of
>>>>> /Users/ron/bin?
>>>>> 
>>>>> Thanks,
>>>>>      Aaron
>>>>> 
>>>>> On Thu, Jun 1, 2023 at 9:18 AM Walt Mankowski via plug <
>>>>> plug@lists.phillylinux.org> wrote:
>>>>> 
>>>>>> On Wed, May 31, 2023 at 11:19:28PM -0400, JP Vossen via plug wrote:
>>>>>>> On 5/31/23 10:36 PM, Gary Duzan via plug wrote:
>>>>>>>>> I always do #!/bin/sh
>>>>>>>>> But I've seen lots of others use #!/usr/bin/env bash
>>>>>>>>> What's the advantage of the latter?
>>>>>>>> 
>>>>>>>>   It gets bash from the PATH instead of whatever specific path you
>>>>>>>> specify. If you have a non-standard setup, or if you want to use a
>>>>>>>> different version installed elsewhere, this can be a benefit. It
>>> could
>>>>>>>> also be a security issue if you accidentally put something insecure
>>> in
>>>>>>>> your PATH and you end up running a worm called "bash" from there.
>>> I've
>>>>>>>> seen the end trick most often with python, presumably from the days
>>>>>>>> when it wasn't standard equipment, so you ended up putting it in
>>>>>>>> /usr/local/bin or $HOME/bin or something. My NetBSD systems have it
>>> in
>>>>>>>> /usr/pkg/bin.
>>>>>>> 
>>>>>>> What Gary said, but also don't use `sh` when you mean `bash`.  That
>>> used
>>>>>> to Just Work on Linux (but not elsewhere), but since about 2016 it's
>>> not
>>>>>> reliable on Linux either, due to use of `dash` as `sh` instead of the
>>> much
>>>>>> larger and thus slower `bash`.
>>>>>>> 
>>>>>>> I'm torn on the hard-code vs. `env` approach.  `env` is more portable,
>>>>>> but there are possible path/poisoning issues as noted.  `#!/bin/bash`
>>> is
>>>>>> just easier to type and more familiar.  :-)
>>>>>> 
>>>>>> Another advantage of using the `env` approach with python and perl is
>>>>>> that it lets you use tools like pyenv and plenv to switch the version
>>>>>> of the interpreter you're using without having to change your code or
>>>>>> your system python/perl.
>>>>>> 
>>>>>> Walt
>>>>>> 
>>> ___________________________________________________________________________
>>>>>> Philadelphia Linux Users Group         --
>>>>>> http://www.phillylinux.org
>>>>>> Announcements -
>>>>>> http://lists.phillylinux.org/mailman/listinfo/plug-announce
>>>>>> General Discussion  --
>>>>>> http://lists.phillylinux.org/mailman/listinfo/plug
>>>>>> 
>>>> 
>>>>> 
>>> ___________________________________________________________________________
>>>>> Philadelphia Linux Users Group         --
>>> http://www.phillylinux.org
>>>>> Announcements -
>>> http://lists.phillylinux.org/mailman/listinfo/plug-announce
>>>>> General Discussion  --
>>> http://lists.phillylinux.org/mailman/listinfo/plug
>>>> 
>>>> 
>>> ___________________________________________________________________________
>>>> Philadelphia Linux Users Group         --
>>> http://www.phillylinux.org
>>>> Announcements -
>>> http://lists.phillylinux.org/mailman/listinfo/plug-announce
>>>> General Discussion  --
>>> http://lists.phillylinux.org/mailman/listinfo/plug
>>> ___________________________________________________________________________
>>> Philadelphia Linux Users Group         --
>>> http://www.phillylinux.org
>>> Announcements -
>>> http://lists.phillylinux.org/mailman/listinfo/plug-announce
>>> General Discussion  --
>>> http://lists.phillylinux.org/mailman/listinfo/plug
>>> 
> 
>> ___________________________________________________________________________
>> Philadelphia Linux Users Group         --        http://www.phillylinux.org
>> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
>> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
> 
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug