Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

It's always sad when the fleas leave, because that means your dog is dead. -- Wesley T. Williams


computers / alt.os.linux / Re: bash in BSD nix just ain't the same

SubjectAuthor
* bash in BSD nix just ain't the sameWoozy Song
+* bash in BSD nix just ain't the sameCecil Westerhof
|`* bash in BSD nix just ain't the sameRichard Kettlewell
| +- bash in BSD nix just ain't the sameWang Yu
| `- bash in BSD nix just ain't the sameCecil Westerhof
+* bash in BSD nix just ain't the sameJasen Betts
|+- bash in BSD nix just ain't the samemarrgol
|`* bash in BSD nix just ain't the sameWoozy Song
| +- bash in BSD nix just ain't the sameJohn Hasler
| +- bash in BSD nix just ain't the sameJasen Betts
| `- bash in BSD nix just ain't the sameCecil Westerhof
+- bash in BSD nix just ain't the sameAllodoxaphobia
+- bash in BSD nix just ain't the sameBit Twister
`* bash in BSD nix just ain't the samePaul
 `- bash in BSD nix just ain't the sameKeith Thompson

1
bash in BSD nix just ain't the same

<u4k50p$2skaf$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1269&group=alt.os.linux#1269

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: suzyw0ng@outlook.com (Woozy Song)
Newsgroups: alt.os.linux
Subject: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 12:49:26 +0800
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <u4k50p$2skaf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 May 2023 04:49:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c27a06f34df21be160b689d2d8f09147";
logging-data="3035471"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8/cPEvwRwKH/HlynOgEj92IAbahf9300="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:wrbiIm/uqQse16sE/M4vztn1ZpY=
X-Mozilla-News-Host: news://news.eternal-september.org:119
 by: Woozy Song - Wed, 24 May 2023 04:49 UTC

So I am trying to port a package from Linux to FreeBSD. I have changed
user default shell to bash, and open xterm, find shell is bash and it
has digested .bashrc login file.
But try to excecute a script with ~/foobar.sh it complains
cannot execute required file not found
The file is there with protection 755
So one has to type source foobar.sh instead.
Which is a hassle as there are a lot of scripts, which call other scripts.

Re: bash in BSD nix just ain't the same

<87353mp7qq.fsf@munus.decebal.nl>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1270&group=alt.os.linux#1270

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Cecil@decebal.nl (Cecil Westerhof)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 08:24:13 +0200
Organization: Decebal Computing
Lines: 19
Message-ID: <87353mp7qq.fsf@munus.decebal.nl>
References: <u4k50p$2skaf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="0b219ae9fb52ae7ef1627c7f84561412";
logging-data="3053152"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gW3LMN8F7NAuSmNuf1eussobLmOl56WM="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:M/84qenLVmmalZm2c/9PUtW64xo=
sha1:Yg+NjHDU9q5QrINA7syMmpk3Nv4=
 by: Cecil Westerhof - Wed, 24 May 2023 06:24 UTC

Woozy Song <suzyw0ng@outlook.com> writes:

> So I am trying to port a package from Linux to FreeBSD. I have changed
> user default shell to bash, and open xterm, find shell is bash and it
> has digested .bashrc login file.
> But try to excecute a script with ~/foobar.sh it complains
> cannot execute required file not found
> The file is there with protection 755
> So one has to type source foobar.sh instead.
> Which is a hassle as there are a lot of scripts, which call other scripts.

If you are not the same user as the user that owns the script, then
this is expected. If you are in the same group then the file
protection should be 775.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: bash in BSD nix just ain't the same

<u4kcje$tr2$1@gonzo.revmaps.no-ip.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1271&group=alt.os.linux#1271

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
From: usenet@revmaps.no-ip.org (Jasen Betts)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Organization: JJ's own news server
Message-ID: <u4kcje$tr2$1@gonzo.revmaps.no-ip.org>
References: <u4k50p$2skaf$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 May 2023 06:58:54 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="30562"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 16
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 24 May 2023 07:00:34 UTC
Date: Wed, 24 May 2023 06:58:54 -0000 (UTC)
X-Received-Bytes: 1683
 by: Jasen Betts - Wed, 24 May 2023 06:58 UTC

On 2023-05-24, Woozy Song <suzyw0ng@outlook.com> wrote:
> So I am trying to port a package from Linux to FreeBSD. I have changed
> user default shell to bash, and open xterm, find shell is bash and it
> has digested .bashrc login file.
> But try to excecute a script with ~/foobar.sh it complains
> cannot execute required file not found
> The file is there with protection 755
> So one has to type source foobar.sh instead.
> Which is a hassle as there are a lot of scripts, which call other scripts.

wrong shebang?

--
Jasen.
🇺🇦 Слава Україні

Re: bash in BSD nix just ain't the same

<wwv1qj641bp.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1272&group=alt.os.linux#1272

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 08:48:26 +0100
Organization: terraraq NNTP server
Message-ID: <wwv1qj641bp.fsf@LkoBDZeT.terraraq.uk>
References: <u4k50p$2skaf$1@dont-email.me> <87353mp7qq.fsf@munus.decebal.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="50588"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:2Ap1KAM1FGNvluF0VqrIFG0EEH4=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Wed, 24 May 2023 07:48 UTC

Cecil Westerhof <Cecil@decebal.nl> writes:
> Woozy Song <suzyw0ng@outlook.com> writes:
>> So I am trying to port a package from Linux to FreeBSD. I have changed
>> user default shell to bash, and open xterm, find shell is bash and it
>> has digested .bashrc login file.
>> But try to excecute a script with ~/foobar.sh it complains
>> cannot execute required file not found
>> The file is there with protection 755
>> So one has to type source foobar.sh instead.
>> Which is a hassle as there are a lot of scripts, which call other scripts.
>
> If you are not the same user as the user that owns the script, then
> this is expected. If you are in the same group then the file
> protection should be 775.

1) Permissions problems don’t produce a ‘file not found’ error.
2) There is no permissions problem. 755 includes read and execute for
world.

--
https://www.greenend.org.uk/rjk/

Re: bash in BSD nix just ain't the same

<slrnu6sc62.t53.trepidation@vps.jonz.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1273&group=alt.os.linux#1273

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: trepidation@example.net (Allodoxaphobia)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: 24 May 2023 15:44:03 GMT
Lines: 18
Message-ID: <slrnu6sc62.t53.trepidation@vps.jonz.net>
References: <u4k50p$2skaf$1@dont-email.me>
Reply-To: If_you_must-Reply_to@my.sig.adr
X-Trace: individual.net qzK4A1u0/Q1aWcFig4zYyAh2FZtHvxS/MooE9IkqtgYss1+UDE
Cancel-Lock: sha1:fip/kRla0N6cZjL28T1S56Anq+w=
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Allodoxaphobia - Wed, 24 May 2023 15:44 UTC

On Wed, 24 May 2023 12:49:26 +0800, Woozy Song wrote:
> So I am trying to port a package from Linux to FreeBSD. I have changed
> user default shell to bash, and open xterm, find shell is bash and it
> has digested .bashrc login file.
> But try to excecute a script with ~/foobar.sh it complains
> cannot execute required file not found

huh? What's in your $PATH ?
I"ll bet it doesn't contain ",~/".
How does
$./foobar.sh
play for you?

Jonesy
--
Marvin L Jones | Marvin | W3DHJ.net | linux
38.238N 104.547W | @ jonz.net | Jonesy | FreeBSD
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm

Re: bash in BSD nix just ain't the same

<u4lhbj$r8c5$1@paganini.bofh.team>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1274&group=alt.os.linux#1274

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: invalid@invalid.net (Wang Yu)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 18:23:59 +0100
Organization: To protect and to server
Message-ID: <u4lhbj$r8c5$1@paganini.bofh.team>
References: <u4k50p$2skaf$1@dont-email.me> <87353mp7qq.fsf@munus.decebal.nl>
<wwv1qj641bp.fsf@LkoBDZeT.terraraq.uk>
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 May 2023 17:26:11 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="893317"; posting-host="lvwnlrZOTyXOUFTBTyWy3g.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:L8WWb5b6yVCPtcHQTSTjkULqy73zlZUi7/2aHHSNzRM=
X-Notice: Filtered by postfilter v. 0.9.3
Content-Language: en-US
 by: Wang Yu - Wed, 24 May 2023 17:23 UTC

On 24/05/2023 08:48, Richard Kettlewell wrote:
> Cecil Westerhof <Cecil@decebal.nl> writes:
>> Woozy Song <suzyw0ng@outlook.com> writes:
>>> So I am trying to port a package from Linux to FreeBSD. I have changed
>>> user default shell to bash, and open xterm, find shell is bash and it
>>> has digested .bashrc login file.
>>> But try to excecute a script with ~/foobar.sh it complains
>>> cannot execute required file not found
>>> The file is there with protection 755
>>> So one has to type source foobar.sh instead.
>>> Which is a hassle as there are a lot of scripts, which call other scripts.
>> If you are not the same user as the user that owns the script, then
>> this is expected. If you are in the same group then the file
>> protection should be 775.
> 1) Permissions problems don�t produce a �file not found� error.
> 2) There is no permissions problem. 755 includes read and execute for
> world.
>

So the Senior Software Engineer is wrong. God help us!!!.

Re: bash in BSD nix just ain't the same

<slrnu6smt7.3uog8.BitTwister@wb.home.arpa>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1275&group=alt.os.linux#1275

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: BitTwister@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 13:47:03 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <slrnu6smt7.3uog8.BitTwister@wb.home.arpa>
References: <u4k50p$2skaf$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="1292a8eda7bf895182e13d732abdec41";
logging-data="3206881"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jUYHumI6B69iym2cIALej7k6VpQ7azWE="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:+xzqhfHXS6aLdDPhjmWj1wxAfFg=
 by: Bit Twister - Wed, 24 May 2023 18:47 UTC

On Wed, 24 May 2023 12:49:26 +0800, Woozy Song wrote:
> So I am trying to port a package from Linux to FreeBSD. I have changed
> user default shell to bash, and open xterm, find shell is bash and it
> has digested .bashrc login file.
> But try to excecute a script with ~/foobar.sh it complains
> cannot execute required file not found
> The file is there with protection 755
> So one has to type source foobar.sh instead.
> Which is a hassle as there are a lot of scripts, which call other scripts.

Need a bit more background and information.

How are you executing foobar.sh, from the command line or from a script?

what is the output from the following five commands:

head -3 ~/foobar.sh
ls -l ~/foobar.sh
id
type ~/foobar.sh
bash --version

You need to post the command and results.

Re: bash in BSD nix just ain't the same

<u4lmoa$3243c$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1276&group=alt.os.linux#1276

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 14:58:17 -0400
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <u4lmoa$3243c$1@dont-email.me>
References: <u4k50p$2skaf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 May 2023 18:58:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dc09c54de6c67533946384e70bf2a116";
logging-data="3215468"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19V3J1RNbK0njCu+H+Bfxu9HJqDPZcS0tE="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:Q60NVcdzyNr9YQeo5LWF9c5JYBk=
In-Reply-To: <u4k50p$2skaf$1@dont-email.me>
Content-Language: en-US
 by: Paul - Wed, 24 May 2023 18:58 UTC

On 5/24/2023 12:49 AM, Woozy Song wrote:
> So I am trying to port a package from Linux to FreeBSD. I have changed user default shell to bash, and open xterm, find shell is bash and it has digested .bashrc login file.
> But try to excecute a script with ~/foobar.sh it complains
>  cannot execute required file not found
> The file is there with protection 755
> So one has to type source foobar.sh instead.
> Which is a hassle as there are a lot of scripts, which call other scripts.

https://docs.freebsd.org/en/articles/linux-users/

"Linux users are often surprised to find that Bash is not the default shell
in FreeBSD. In fact, Bash is not included in the default installation.
Instead, the Bourne shell-compatible sh(1) as the default user shell."

Check very carefully, that the shell executable you are running
right now, is actually bash, and is not "something else" like
an aliased /bin/sh .

Writing portable scripts (commercial grade installers), is an art, and a research project.

A portable script "does not know whether it is on Earth or
on Mars, but it will check first to see if there is oxygen and
nitrogen in the room". Look at how much work a ./configure
does some day, for inspiration.

Paul

Re: bash in BSD nix just ain't the same

<u4loh6$32em6$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1277&group=alt.os.linux#1277

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: marrgol@address.invalid (marrgol)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 21:28:38 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u4loh6$32em6$1@dont-email.me>
References: <u4k50p$2skaf$1@dont-email.me>
<u4kcje$tr2$1@gonzo.revmaps.no-ip.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 May 2023 19:28:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ef4ddc6a448f0cd2a9ad710a7ae8abfe";
logging-data="3226310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LzmPFXXsmKUO31s4Bh1Ez"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:YJBgU48tc0G5LciMbmworUfFdFQ=
Content-Language: en-US
In-Reply-To: <u4kcje$tr2$1@gonzo.revmaps.no-ip.org>
 by: marrgol - Wed, 24 May 2023 19:28 UTC

On 24/05/2023 at 08.58, Jasen Betts wrote:
>> So I am trying to port a package from Linux to FreeBSD. I have changed
>> user default shell to bash, and open xterm, find shell is bash and it
>> has digested .bashrc login file.
>> But try to excecute a script with ~/foobar.sh it complains
>> cannot execute required file not found
>> The file is there with protection 755
>> So one has to type source foobar.sh instead.
>> Which is a hassle as there are a lot of scripts, which call other scripts.
>
> wrong shebang?

Would be my first guess too, especially CR+LF instead of LF alone
as the line terminator. @OP: What exactly does

head -1 foobar.sh | cat -A

show?

--
mrg

Re: bash in BSD nix just ain't the same

<878rddnzl5.fsf@munus.decebal.nl>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1278&group=alt.os.linux#1278

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Cecil@decebal.nl (Cecil Westerhof)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Thu, 25 May 2023 00:17:58 +0200
Organization: Decebal Computing
Lines: 28
Message-ID: <878rddnzl5.fsf@munus.decebal.nl>
References: <u4k50p$2skaf$1@dont-email.me> <87353mp7qq.fsf@munus.decebal.nl>
<wwv1qj641bp.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="3653158890fe6f29d539e45f15350ef3";
logging-data="3284199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZUCTCSa85UsUC1Amui38eOyr4BVxmuV8="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:z4u1FZ23QQvnAk9MuJ3o9f5J2F4=
sha1:HA3fj+mSRI9A/Is2T4BkjEXTthE=
 by: Cecil Westerhof - Wed, 24 May 2023 22:17 UTC

Richard Kettlewell <invalid@invalid.invalid> writes:

> Cecil Westerhof <Cecil@decebal.nl> writes:
>> Woozy Song <suzyw0ng@outlook.com> writes:
>>> So I am trying to port a package from Linux to FreeBSD. I have changed
>>> user default shell to bash, and open xterm, find shell is bash and it
>>> has digested .bashrc login file.
>>> But try to excecute a script with ~/foobar.sh it complains
>>> cannot execute required file not found
>>> The file is there with protection 755
>>> So one has to type source foobar.sh instead.
>>> Which is a hassle as there are a lot of scripts, which call other scripts.
>>
>> If you are not the same user as the user that owns the script, then
>> this is expected. If you are in the same group then the file
>> protection should be 775.
>
> 1) Permissions problems don’t produce a ‘file not found’ error.
> 2) There is no permissions problem. 755 includes read and execute for
> world.

I should not respond fast when I am very tired. 😪😱
My bad.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: bash in BSD nix just ain't the same

<u4mb17$35gmp$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1279&group=alt.os.linux#1279

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: suzyw0ng@outlook.com (Woozy Song)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Thu, 25 May 2023 08:44:20 +0800
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <u4mb17$35gmp$1@dont-email.me>
References: <u4k50p$2skaf$1@dont-email.me>
<u4kcje$tr2$1@gonzo.revmaps.no-ip.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 25 May 2023 00:44:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="32f159aa84ac3ce1bd731d1eee41e02f";
logging-data="3326681"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CSngT/rtOOpdFqZS7I/K8V/zu0anikig="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:/kP+PeVcZJiP9wzt5F5tdAeHBsI=
In-Reply-To: <u4kcje$tr2$1@gonzo.revmaps.no-ip.org>
 by: Woozy Song - Thu, 25 May 2023 00:44 UTC

Jasen Betts wrote:
>
> wrong shebang?
>
>

Yes I think that is the issue - bash is in a different directory in BSD
and Linux.
But apart from that found a really weird issue: 2 of the dozens of
scripts require 'bash fubah.sh' rather than 'source fubah.sh' because
the console window closes instantly if you try to execute it any other
way. So no error message, no idea what is going on.
But there is nothing unusual in those 2 scripts. Have tried commenting
out various lines, but haven't found out what is fatal yet.

Re: bash in BSD nix just ain't the same

<87cz2p88qh.fsf@sugarbit.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1280&group=alt.os.linux#1280

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: john@sugarbit.com (John Hasler)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 24 May 2023 21:07:02 -0500
Organization: Dancing Horse Hill
Lines: 14
Message-ID: <87cz2p88qh.fsf@sugarbit.com>
References: <u4k50p$2skaf$1@dont-email.me>
<u4kcje$tr2$1@gonzo.revmaps.no-ip.org> <u4mb17$35gmp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="45a6706942ad2b213ee02491eab9fa4e";
logging-data="3476813"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xRuzv8bUmeSmmvjuwHS25rjzjaSJsVB8="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:PuvK46LaP4w2saMs6bkbD7I19ls=
sha1:nyRiP0o78SE1cQggSJbbpOun34M=
 by: John Hasler - Thu, 25 May 2023 02:07 UTC

Woozy Song writes:
> But apart from that found a really weird issue: 2 of the dozens of
> scripts require 'bash fubah.sh' rather than 'source fubah.sh' because
> the console window closes instantly if you try to execute it any other
> way. So no error message, no idea what is going on. But there is
> nothing unusual in those 2 scripts. Have tried commenting out various
> lines, but haven't found out what is fatal yet.

Those scripts probably contain "exit" commands.
--
John Hasler
john@sugarbit.com
Dancing Horse Hill
Elmwood, WI USA

Re: bash in BSD nix just ain't the same

<u4nfr4$mev$1@gonzo.revmaps.no-ip.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1281&group=alt.os.linux#1281

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
From: usenet@revmaps.no-ip.org (Jasen Betts)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Organization: JJ's own news server
Message-ID: <u4nfr4$mev$1@gonzo.revmaps.no-ip.org>
References: <u4k50p$2skaf$1@dont-email.me>
<u4kcje$tr2$1@gonzo.revmaps.no-ip.org> <u4mb17$35gmp$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 25 May 2023 11:12:36 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="23007"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 22
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 25 May 2023 11:30:35 UTC
Date: Thu, 25 May 2023 11:12:36 -0000 (UTC)
X-Received-Bytes: 1996
 by: Jasen Betts - Thu, 25 May 2023 11:12 UTC

On 2023-05-25, Woozy Song <suzyw0ng@outlook.com> wrote:
> Jasen Betts wrote:
>>
>> wrong shebang?
>>
>>
>
> Yes I think that is the issue - bash is in a different directory in BSD
> and Linux.
> But apart from that found a really weird issue: 2 of the dozens of
> scripts require 'bash fubah.sh' rather than 'source fubah.sh' because
> the console window closes instantly if you try to execute it any other
> way. So no error message, no idea what is going on.
> But there is nothing unusual in those 2 scripts. Have tried commenting
> out various lines, but haven't found out what is fatal yet.

if a script ends with exit it will close the shell when sourced.

--
Jasen.
🇺🇦 Слава Україні

Re: bash in BSD nix just ain't the same

<87v8ge9rur.fsf@munus.decebal.nl>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1282&group=alt.os.linux#1282

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Cecil@decebal.nl (Cecil Westerhof)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Sat, 27 May 2023 09:05:32 +0200
Organization: Decebal Computing
Lines: 22
Message-ID: <87v8ge9rur.fsf@munus.decebal.nl>
References: <u4k50p$2skaf$1@dont-email.me>
<u4kcje$tr2$1@gonzo.revmaps.no-ip.org> <u4mb17$35gmp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="9de5753bbf253415343bcefdc7faf9a1";
logging-data="370714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zaIcM9cw8smmBL0yDGJu7awLqn8zXT7A="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:eENhX7Ode1pkLvjrfslUmKnf5JA=
sha1:+BC0KU5y2Mo8OrDzM71ADEvTZCM=
 by: Cecil Westerhof - Sat, 27 May 2023 07:05 UTC

Woozy Song <suzyw0ng@outlook.com> writes:

> Jasen Betts wrote:
>> wrong shebang?
>>
>
> Yes I think that is the issue - bash is in a different directory in BSD
> and Linux.

That is why I always use:
#!/usr/bin/env bash

That should work on every nix system.
There should be a env in /usr/bin and this then finds where bash is
installed on the current system and calls it.

Works of-course also for python, perl, …

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: bash in BSD nix just ain't the same

<871qhcpu43.fsf@nosuchdomain.example.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2058&group=alt.os.linux#2058

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: alt.os.linux
Subject: Re: bash in BSD nix just ain't the same
Date: Wed, 12 Jul 2023 16:50:36 -0700
Organization: None to speak of
Lines: 50
Message-ID: <871qhcpu43.fsf@nosuchdomain.example.com>
References: <u4k50p$2skaf$1@dont-email.me> <u4lmoa$3243c$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="2b19e42c760835ee102e4ee4d867eda6";
logging-data="3592300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gMDfs5zw4ByNGEuTlzPJg"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:mTNV5n7aW61c9qou60b54GWkdss=
sha1:ZBsvuf58+dUB9wpVkuB1JKZ3TcQ=
 by: Keith Thompson - Wed, 12 Jul 2023 23:50 UTC

Paul <nospam@needed.invalid> writes:
> On 5/24/2023 12:49 AM, Woozy Song wrote:
>> So I am trying to port a package from Linux to FreeBSD. I have
>> changed user default shell to bash, and open xterm, find shell is
>> bash and it has digested .bashrc login file.
>> But try to excecute a script with ~/foobar.sh it complains
>>  cannot execute required file not found
>> The file is there with protection 755
>> So one has to type source foobar.sh instead.
>> Which is a hassle as there are a lot of scripts, which call other scripts.
>
> https://docs.freebsd.org/en/articles/linux-users/
>
> "Linux users are often surprised to find that Bash is not the default shell
> in FreeBSD. In fact, Bash is not included in the default installation.
> Instead, the Bourne shell-compatible sh(1) as the default user shell."
>
> Check very carefully, that the shell executable you are running
> right now, is actually bash, and is not "something else" like
> an aliased /bin/sh .

It's very unlikely that an executable named "bash" would be anything
other than an actual GNU Bash shell. "/bin/sh" could be any of several
things, but "bash" is going to be Bash unless someone has deliberately
misconfigured it.

bash is likely not installed by default on a *BSD system, and if it is
installed it's likely to be /usr/local/bin/bash rather than /bin/bash .

The OP's probably is likely to be the "#!" line, but they haven't said
what the current "#!" line looks like.

One solution is to use "#!/usr/bin/env bash". (Assuming that env is in
/usr/bin seems to be safer than assuming that bash is in /bin.) The
advantage of that is that it uses the first "bash" executable in the
user's $PATH. The *disadvantage* is that it uses the first "bash"
executable in the user's $PATH, which might be an unstable version that
the user installed manually.

My preferred solution is to update the "#!" line to match the location
of the bash executable: "#!/bin/bash" on Linux-based systems,
"#!/usr/local/bin/bash" on BSD-based systems (after installing bash if
necessary).

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor