Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

7 May, 2024: fms is rebuilding. Don't expect much in that section for quite a few days, maybe longer.


devel / comp.unix.shell / Re: nohup while ...

SubjectAuthor
* nohup while ...hongy...@gmail.com
+* Re: nohup while ...Spiros Bousbouras
|`* Re: nohup while ...hongy...@gmail.com
| `* Re: nohup while ...Keith Thompson
|  `- Re: nohup while ...hongy...@gmail.com
+* Re: nohup while ...Richard Harnden
|`- Re: nohup while ...hongy...@gmail.com
`* Re: nohup while ...John McCue
 +* Re: nohup while ...Janis Papanagnou
 |`* Re: nohup while ...John McCue
 | `* Re: nohup while ...Janis Papanagnou
 |  +* Re: nohup while ...Keith Thompson
 |  |`- Re: nohup while ...Janis Papanagnou
 |  +- Re: nohup while ...Chris Elvidge
 |  `- Re: nohup while ...John McCue
 `* Re: nohup while ...Keith Thompson
  +* Re: nohup while ...John McCue
  |`* Re: nohup while ...Janis Papanagnou
  | `* Re: nohup while ...Spiros Bousbouras
  |  +- Re: nohup while ...Janis Papanagnou
  |  `- Re: nohup while ...Janis Papanagnou
  `- Re: nohup while ...hongy...@gmail.com

1
nohup while ...

<0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4788&group=comp.unix.shell#4788

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a37:bd05:: with SMTP id n5mr731948qkf.293.1640251305814;
Thu, 23 Dec 2021 01:21:45 -0800 (PST)
X-Received: by 2002:a05:620a:1a9d:: with SMTP id bl29mr756820qkb.55.1640251305623;
Thu, 23 Dec 2021 01:21:45 -0800 (PST)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Thu, 23 Dec 2021 01:21:45 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=203.175.13.154; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 203.175.13.154
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
Subject: nohup while ...
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Thu, 23 Dec 2021 09:21:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 20
 by: hongy...@gmail.com - Thu, 23 Dec 2021 09:21 UTC

I've the following bash script:

------- begin --------
#!/usr/bin/env bash

nohup while :; do
if some-cond; then
nohup some-command &>/dev/null &
fi
sleep 5
done &>/dev/null &
------- end --------

It seems that the first “nohup” in the script is unnecessary/superfluous, i.e., the same effect can be achieved with or without it - after I exit the terminal, the process still keeps running.
Are there any tips for this behavior of the bash shell?

Regards,
HZ

Re: nohup while ...

<UlBe7LiknZPQPlbr6@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4789&group=comp.unix.shell#4789

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Thu, 23 Dec 2021 14:07:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <UlBe7LiknZPQPlbr6@bongo-ra.co>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 23 Dec 2021 14:07:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ffeb2e1024f23fea68b633f00e25b679";
logging-data="25065"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sqzZ+Nb65Y9pgaiglytPE"
Cancel-Lock: sha1:eS3lCwgb3s1D22Tn2VrEavvuQtE=
In-Reply-To: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
 by: Spiros Bousbouras - Thu, 23 Dec 2021 14:07 UTC

On Thu, 23 Dec 2021 01:21:45 -0800 (PST)
"hongy...@gmail.com" <hongyi.zhao@gmail.com> wrote:
> I've the following bash script:
>
> ------- begin --------
> #!/usr/bin/env bash
>
> nohup while :; do
> if some-cond; then
> nohup some-command &>/dev/null &
> fi
> sleep 5
> done &>/dev/null &
> ------- end --------
>
> It seems that the first “nohup” in the script is
> unnecessary/superfluous, i.e., the same effect can be achieved
> with or without it - after I exit the terminal, the process still
> keeps running.

I don't think that nohup is a shell builtin. So if you were to try your
construct with actual commands , BASH would print some error message due
to being unable to parse the code. Perhaps you wouldn't see the error
message due to the redirections you make but my guess is that you would.

It would have been best if you had actually posted the code with which
you did your experiments instead of replacing it with a generic version.
A generic version which shows the general rule you think applies would
have been fine but *in addition* to actual running code.

--
vlaho.ninja/prog

Re: nohup while ...

<cce2d598-3d19-4730-8173-c9ead6eb9eb5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4790&group=comp.unix.shell#4790

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:6214:cab:: with SMTP id s11mr3741052qvs.131.1640303519962;
Thu, 23 Dec 2021 15:51:59 -0800 (PST)
X-Received: by 2002:a37:ad17:: with SMTP id f23mr3173277qkm.734.1640303519805;
Thu, 23 Dec 2021 15:51:59 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Thu, 23 Dec 2021 15:51:59 -0800 (PST)
In-Reply-To: <UlBe7LiknZPQPlbr6@bongo-ra.co>
Injection-Info: google-groups.googlegroups.com; posting-host=203.175.13.154; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 203.175.13.154
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com> <UlBe7LiknZPQPlbr6@bongo-ra.co>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cce2d598-3d19-4730-8173-c9ead6eb9eb5n@googlegroups.com>
Subject: Re: nohup while ...
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Thu, 23 Dec 2021 23:51:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 47
 by: hongy...@gmail.com - Thu, 23 Dec 2021 23:51 UTC

On Thursday, December 23, 2021 at 10:07:45 PM UTC+8, Spiros Bousbouras wrote:
> On Thu, 23 Dec 2021 01:21:45 -0800 (PST)
> "hongy...@gmail.com" <hongy...@gmail.com> wrote:
> > I've the following bash script:
> >
> > ------- begin --------
> > #!/usr/bin/env bash
> >
> > nohup while :; do
> > if some-cond; then
> > nohup some-command &>/dev/null &
> > fi
> > sleep 5
> > done &>/dev/null &
> > ------- end --------
> >
> > It seems that the first “nohup” in the script is
> > unnecessary/superfluous, i.e., the same effect can be achieved
> > with or without it - after I exit the terminal, the process still
> > keeps running.
> I don't think that nohup is a shell builtin. So if you were to try your
> construct with actual commands , BASH would print some error message due
> to being unable to parse the code. Perhaps you wouldn't see the error
> message due to the redirections you make but my guess is that you would.
>
> It would have been best if you had actually posted the code with which
> you did your experiments instead of replacing it with a generic version.
> A generic version which shows the general rule you think applies would
> have been fine but *in addition* to actual running code.

See the following:

#!/usr/bin/env bash

nohup while :; do
if ! lsof -i :18080 &>/dev/null; then
nohup socat -v -d -d TCP4-LISTEN:18080,fork,reuseaddr PROXY:my.domain.com:10.8.10.100:80,proxyport=6002 &>/dev/null &
fi
sleep 5
done &>/dev/null &

HZ

Re: nohup while ...

<87r1a24wfi.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4791&group=comp.unix.shell#4791

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Thu, 23 Dec 2021 17:35:13 -0800
Organization: None to speak of
Lines: 39
Message-ID: <87r1a24wfi.fsf@nosuchdomain.example.com>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<UlBe7LiknZPQPlbr6@bongo-ra.co>
<cce2d598-3d19-4730-8173-c9ead6eb9eb5n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="5a36d27a106a7e4278a569cad8e0fc96";
logging-data="11457"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19SwyU+/SaS1dHq1hgHLWMM"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:D8gf5zNOtCAkfVQRxifTHIeMWow=
sha1:LGufEhUM3whxgY7onWgHH5gqYoc=
 by: Keith Thompson - Fri, 24 Dec 2021 01:35 UTC

"hongy...@gmail.com" <hongyi.zhao@gmail.com> writes:
[...]
>> On Thu, 23 Dec 2021 01:21:45 -0800 (PST)
>> "hongy...@gmail.com" <hongy...@gmail.com> wrote:
[...]
>> > It seems that the first “nohup” in the script is
>> > unnecessary/superfluous, i.e., the same effect can be achieved
>> > with or without it - after I exit the terminal, the process still
>> > keeps running.
[...]
> See the following:
>
> #!/usr/bin/env bash
>
> nohup while :; do
> if ! lsof -i :18080 &>/dev/null; then
> nohup socat -v -d -d TCP4-LISTEN:18080,fork,reuseaddr PROXY:my.domain.com:10.8.10.100:80,proxyport=6002 &>/dev/null &
> fi
> sleep 5
> done &>/dev/null &

Yes, I see it. What about it? Did you run it? What happened?

In your initial post, you say the first "nohup" is superfluous, that the
same effect is achieved with or without it. But when I try to run your most
recent script, I get the result I expected:

./tmp.bash: line 3: syntax error near unexpected token `do'
./tmp.bash: line 3: `nohup while :; do'

Either you got the same error message and didn't bother to mention it,
or you didn't get the same error message and something very strange is
going on (perhaps the script you posted doesn't match the script you
ran). Which is it?

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: nohup while ...

<b09e5217-4c2c-40a9-a094-e5442f3ecf12n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4792&group=comp.unix.shell#4792

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:6214:d66:: with SMTP id 6mr4619398qvs.85.1640329072547;
Thu, 23 Dec 2021 22:57:52 -0800 (PST)
X-Received: by 2002:ac8:5c11:: with SMTP id i17mr4496718qti.669.1640329072344;
Thu, 23 Dec 2021 22:57:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Thu, 23 Dec 2021 22:57:52 -0800 (PST)
In-Reply-To: <87r1a24wfi.fsf@nosuchdomain.example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=203.175.13.154; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 203.175.13.154
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<UlBe7LiknZPQPlbr6@bongo-ra.co> <cce2d598-3d19-4730-8173-c9ead6eb9eb5n@googlegroups.com>
<87r1a24wfi.fsf@nosuchdomain.example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b09e5217-4c2c-40a9-a094-e5442f3ecf12n@googlegroups.com>
Subject: Re: nohup while ...
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 24 Dec 2021 06:57:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 44
 by: hongy...@gmail.com - Fri, 24 Dec 2021 06:57 UTC

On Friday, December 24, 2021 at 9:35:18 AM UTC+8, Keith Thompson wrote:
> "hongy...@gmail.com" <hongy...@gmail.com> writes:
> [...]
> >> On Thu, 23 Dec 2021 01:21:45 -0800 (PST)
> >> "hongy...@gmail.com" <hongy...@gmail.com> wrote:
> [...]
> >> > It seems that the first “nohup” in the script is
> >> > unnecessary/superfluous, i.e., the same effect can be achieved
> >> > with or without it - after I exit the terminal, the process still
> >> > keeps running.
> [...]
> > See the following:
> >
> > #!/usr/bin/env bash
> >
> > nohup while :; do
> > if ! lsof -i :18080 &>/dev/null; then
> > nohup socat -v -d -d TCP4-LISTEN:18080,fork,reuseaddr PROXY:my.domain.com:10.8.10.100:80,proxyport=6002 &>/dev/null &
> > fi
> > sleep 5
> > done &>/dev/null &
> Yes, I see it. What about it? Did you run it? What happened?
>
> In your initial post, you say the first "nohup" is superfluous, that the
> same effect is achieved with or without it. But when I try to run your most
> recent script, I get the result I expected:
>
> ./tmp.bash: line 3: syntax error near unexpected token `do'
> ./tmp.bash: line 3: `nohup while :; do'

Now, I retried the script above, and obtained the exactly same error as yours.
> Either you got the same error message and didn't bother to mention it,
> or you didn't get the same error message and something very strange is
> going on (perhaps the script you posted doesn't match the script you
> ran). Which is it?

Really, you're right. I tried the first `nohup` stripped version in both cases, so I came to the wrong conclusion.

HZ

Re: nohup while ...

<sq4b73$el7$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4793&group=comp.unix.shell#4793

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: richard.nospam@gmail.com (Richard Harnden)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Fri, 24 Dec 2021 11:33:55 +0000
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <sq4b73$el7$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
Reply-To: nospam.harnden@gmail.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Dec 2021 11:33:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bb4b5449c780abd35c9ffc0ff75f3da1";
logging-data="15015"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192Agaxk+f24HEp6dhFiisrzBpFTkjQOlc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Cancel-Lock: sha1:s+xwqbrNukYE0WoyChQIHXCGaSY=
In-Reply-To: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
 by: Richard Harnden - Fri, 24 Dec 2021 11:33 UTC

On 23/12/2021 09:21, hongy...@gmail.com wrote:
> I've the following bash script:
>
> ------- begin --------
> #!/usr/bin/env bash
>
> nohup while :; do
> if some-cond; then
> nohup some-command &>/dev/null &
> fi
> sleep 5
> done &>/dev/null &
> ------- end --------
>
> It seems that the first “nohup” in the script is unnecessary/superfluous, i.e., the same effect can be achieved with or without it - after I exit the terminal, the process still keeps running.
>
> Are there any tips for this behavior of the bash shell?
>
> Regards,
> HZ

Does it really need to check every 5 seconds?

Why can't you just cron it every minute?

Re: nohup while ...

<sq4htl$lo5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4794&group=comp.unix.shell#4794

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jmccue@fuzzball.mhome.org (John McCue)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Fri, 24 Dec 2021 13:28:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <sq4htl$lo5$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
Reply-To: jmclnx@SPAMisBADgmail.com
Injection-Date: Fri, 24 Dec 2021 13:28:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e41602334cb428c1eb1046ee7cc7b32f";
logging-data="22277"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uZP81znOI5VzoB1NxLd9u"
User-Agent: tin/2.4.4-20191224 ("Millburn") (OpenBSD/7.0 (amd64))
Cancel-Lock: sha1:k9hbbO/t3SFLDy3CIlRa8aBoNSI=
X-OS-Version: OpenBSD 7.0 amd64
 by: John McCue - Fri, 24 Dec 2021 13:28 UTC

hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
> I've the following bash script:
>
> ------- begin --------
> #!/usr/bin/env bash
>
> nohup while :; do
while is a built in, no need for that here

> if some-cond; then
> nohup some-command &>/dev/null &

nohup here is a builtin too, there is an external nohup
but you need specify something like /usr/bin/nohup
instead.

> fi
> sleep 5
What happens if 'some-cond' always succeeds and
'some-command' executes for much longer than 5
seconds ? That could slow down your system quite
a bit

I would add a 'wait' after 'some-command'.

> done &>/dev/null &
> ------- end --------
>
<snip>
>
> Are there any tips for this behavior of the bash shell?

As someone suggested, cron may be a better choice. But
instead of having nohup all over the place put all of
this into a script and use nohup on that script.

--
csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars

Re: nohup while ...

<4027744d-5b9d-4f45-b850-03968da94db2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4795&group=comp.unix.shell#4795

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:22ed:: with SMTP id p13mr3251913qki.768.1640352711600;
Fri, 24 Dec 2021 05:31:51 -0800 (PST)
X-Received: by 2002:ad4:594d:: with SMTP id eo13mr5644964qvb.112.1640352711428;
Fri, 24 Dec 2021 05:31:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 24 Dec 2021 05:31:51 -0800 (PST)
In-Reply-To: <sq4b73$el7$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=203.175.13.154; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 203.175.13.154
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com> <sq4b73$el7$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4027744d-5b9d-4f45-b850-03968da94db2n@googlegroups.com>
Subject: Re: nohup while ...
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 24 Dec 2021 13:31:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: hongy...@gmail.com - Fri, 24 Dec 2021 13:31 UTC

On Friday, December 24, 2021 at 7:33:59 PM UTC+8, Richard Harnden wrote:
> On 23/12/2021 09:21, hongy...@gmail.com wrote:
> > I've the following bash script:
> >
> > ------- begin --------
> > #!/usr/bin/env bash
> >
> > nohup while :; do
> > if some-cond; then
> > nohup some-command &>/dev/null &
> > fi
> > sleep 5
> > done &>/dev/null &
> > ------- end --------
> >
> > It seems that the first “nohup” in the script is unnecessary/superfluous, i.e., the same effect can be achieved with or without it - after I exit the terminal, the process still keeps running.
> >
> > Are there any tips for this behavior of the bash shell?
> >
> > Regards,
> > HZ
> Does it really need to check every 5 seconds?

Just as an example, but 5 second checking intervals will not bring much extra load.

> Why can't you just cron it every minute?

Do you mean cron doesn't support the time controlling granularity in seconds?

Re: nohup while ...

<sq4i72$r9a$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4796&group=comp.unix.shell#4796

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Fri, 24 Dec 2021 14:33:21 +0100
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <sq4i72$r9a$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 24 Dec 2021 13:33:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f6001fa5ccb8c85039657e552b687b3c";
logging-data="27946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Hu1pJV+nJieZHICFjqnYp"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:gB9KMOepNcrQy+lUpVaE6deCSDI=
In-Reply-To: <sq4htl$lo5$1@dont-email.me>
 by: Janis Papanagnou - Fri, 24 Dec 2021 13:33 UTC

On 24.12.2021 14:28, John McCue wrote:
>
> nohup here is a builtin too, there is an external nohup
> but you need specify something like /usr/bin/nohup
> instead.

That's not true.

Janis

Re: nohup while ...

<sq5c47$nio$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4798&group=comp.unix.shell#4798

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jmccue@fuzzball.mhome.org (John McCue)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Fri, 24 Dec 2021 20:55:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <sq5c47$nio$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com> <sq4htl$lo5$1@dont-email.me> <sq4i72$r9a$1@dont-email.me>
Reply-To: jmclnx@SPAMisBADgmail.com
Injection-Date: Fri, 24 Dec 2021 20:55:35 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e41602334cb428c1eb1046ee7cc7b32f";
logging-data="24152"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZF6sAI67P03fF64k9+kyY"
User-Agent: tin/2.4.4-20191224 ("Millburn") (OpenBSD/7.0 (amd64))
Cancel-Lock: sha1:vkXdHi3uGYxWnUJCLrpCt8T4NmM=
X-OS-Version: OpenBSD 7.0 amd64
 by: John McCue - Fri, 24 Dec 2021 20:55 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 24.12.2021 14:28, John McCue wrote:
>>
>> nohup here is a builtin too, there is an external nohup
>> but you need specify something like /usr/bin/nohup
>> instead.
>
> That's not true.

Interesting, for me it is:
which nohup
nohup: shell built-in command.

But I went into bash and it is not, I was not expecting that.
Good to know.

So it depends upon your shell.

> Janis

--
csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars

Re: nohup while ...

<87ilvd4ph7.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4799&group=comp.unix.shell#4799

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Fri, 24 Dec 2021 14:17:40 -0800
Organization: None to speak of
Lines: 15
Message-ID: <87ilvd4ph7.fsf@nosuchdomain.example.com>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="5a36d27a106a7e4278a569cad8e0fc96";
logging-data="20032"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18d9uCqtjS8WHbzEQwPC9aB"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:SNjAwaGp208HFMGhfGkhU33TAEA=
sha1:R+MBwmyfCRRgwFrB5Szc6feJOiM=
 by: Keith Thompson - Fri, 24 Dec 2021 22:17 UTC

John McCue <jmccue@fuzzball.mhome.org> writes:
[...]
> nohup here is a builtin too, there is an external nohup
> but you need specify something like /usr/bin/nohup
> instead.
[...]

nohup is a builtin in csh and tcsh, not in bash, ksh, or zsh.

If you're using csh, it's definitely worth mentioning that fact.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: nohup while ...

<sq5ms4$ls4$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4800&group=comp.unix.shell#4800

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 00:59:00 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <sq5ms4$ls4$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <sq4i72$r9a$1@dont-email.me>
<sq5c47$nio$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 24 Dec 2021 23:59:00 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="30a8a76792030918f4e32592cbf8a933";
logging-data="22404"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RkjO5DRZuhbKIZyAap6Fh"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:p64gmo3tngyaAuhOvxxcgYh/JfU=
In-Reply-To: <sq5c47$nio$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Fri, 24 Dec 2021 23:59 UTC

On 24.12.2021 21:55, John McCue wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> On 24.12.2021 14:28, John McCue wrote:
>>>
>>> nohup here is a builtin too, there is an external nohup
>>> but you need specify something like /usr/bin/nohup
>>> instead.
>>
>> That's not true.
>
> Interesting, for me it is:
> which nohup
> nohup: shell built-in command.

Out of curiosity; which shell is that?

> But I went into bash and it is not, I was not expecting that.
> Good to know.
>
> So it depends upon your shell.

Yes, it's up to the shell whether a command is provided as builtin
or not. I've tried with ksh, which has a builtin command that shows
all the builtins, but you can also use an own test (disabling PATH)

$ bash -c '( PATH= ; nohup sleep 1 )'
bash: nohup: No such file or directory

(or use 'which' or 'whence -a' depending on your system environment
or shell). Also in Ksh (and I think in Bash as well) it's possible
to implement a builtin nohup and dynamically load it as builtin, so
it's also no static property of any shell but depends on the actual
system. It boils down to not making any assumptions about builtins,
unless the standardized ones.

Janis

Re: nohup while ...

<87a6gp4kla.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4801&group=comp.unix.shell#4801

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Fri, 24 Dec 2021 16:03:13 -0800
Organization: None to speak of
Lines: 46
Message-ID: <87a6gp4kla.fsf@nosuchdomain.example.com>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <sq4i72$r9a$1@dont-email.me>
<sq5c47$nio$1@dont-email.me> <sq5ms4$ls4$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="cf370e51213a1515bdf99a7edd179933";
logging-data="19359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Uf7+WvAWfPFdRDSpEGmx1"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:zpSJNBwuXMRHrgun9ODdXh4l7PM=
sha1:axK75SOsmZO3M7+Ub6sd5w8vtlA=
 by: Keith Thompson - Sat, 25 Dec 2021 00:03 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
> On 24.12.2021 21:55, John McCue wrote:
>> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> On 24.12.2021 14:28, John McCue wrote:
>>>>
>>>> nohup here is a builtin too, there is an external nohup
>>>> but you need specify something like /usr/bin/nohup
>>>> instead.
>>>
>>> That's not true.
>>
>> Interesting, for me it is:
>> which nohup
>> nohup: shell built-in command.
>
> Out of curiosity; which shell is that?
>
>> But I went into bash and it is not, I was not expecting that.
>> Good to know.
>>
>> So it depends upon your shell.
>
> Yes, it's up to the shell whether a command is provided as builtin
> or not. I've tried with ksh, which has a builtin command that shows
> all the builtins, but you can also use an own test (disabling PATH)
>
> $ bash -c '( PATH= ; nohup sleep 1 )'
> bash: nohup: No such file or directory
>
> (or use 'which' or 'whence -a' depending on your system environment
> or shell). Also in Ksh (and I think in Bash as well) it's possible
> to implement a builtin nohup and dynamically load it as builtin, so
> it's also no static property of any shell but depends on the actual
> system. It boils down to not making any assumptions about builtins,
> unless the standardized ones.

"which" is typically an external command and *not* a builtin, so it has
no way of knowing about builtins for the current shell.

For Bourne-like shells, I find "type" or "type -a" (a builtin) to be
much better than "which".

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: nohup while ...

<sq5nab$oam$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4802&group=comp.unix.shell#4802

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 01:06:35 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <sq5nab$oam$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <sq4i72$r9a$1@dont-email.me>
<sq5c47$nio$1@dont-email.me> <sq5ms4$ls4$1@dont-email.me>
<87a6gp4kla.fsf@nosuchdomain.example.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 25 Dec 2021 00:06:35 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="30a8a76792030918f4e32592cbf8a933";
logging-data="24918"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rupJnX6m90jYiBJ/g9J4l"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:qPH3qvIn9vngfNqjoPe+le8GZCA=
In-Reply-To: <87a6gp4kla.fsf@nosuchdomain.example.com>
 by: Janis Papanagnou - Sat, 25 Dec 2021 00:06 UTC

On 25.12.2021 01:03, Keith Thompson wrote:
>
> "which" is typically an external command and *not* a builtin, so it has
> no way of knowing about builtins for the current shell.

You are absolutely right.

> For Bourne-like shells, I find "type" or "type -a" (a builtin) to be
> much better than "which".

In Kornshell I use "whence -a". BTW (in Kornshell)

$ whence -a whence
whence is a shell builtin

$ whence -a type
type is an alias for 'whence -v'
type is a shell builtin

Janis

Re: nohup while ...

<sq5o05$r85$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4803&group=comp.unix.shell#4803

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chris@mshome.net (Chris Elvidge)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 00:18:12 +0000
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <sq5o05$r85$2@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <sq4i72$r9a$1@dont-email.me>
<sq5c47$nio$1@dont-email.me> <sq5ms4$ls4$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 25 Dec 2021 00:18:14 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="79783dc2f90f5a633eb0a96f9fc6907b";
logging-data="27909"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qoNz2LN3yZew+iIep9eB8IUJJAiohfrU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:ehlu+fPgqBu92nlVH059jKBqU9E=
In-Reply-To: <sq5ms4$ls4$1@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Sat, 25 Dec 2021 00:18 UTC

On 24/12/2021 23:59, Janis Papanagnou wrote:
> On 24.12.2021 21:55, John McCue wrote:
>> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> On 24.12.2021 14:28, John McCue wrote:
>>>>
>>>> nohup here is a builtin too, there is an external nohup
>>>> but you need specify something like /usr/bin/nohup
>>>> instead.
>>>
>>> That's not true.
>>
>> Interesting, for me it is:
>> which nohup
>> nohup: shell built-in command.
>
> Out of curiosity; which shell is that?
>
>> But I went into bash and it is not, I was not expecting that.
>> Good to know.
>>
>> So it depends upon your shell.
>
> Yes, it's up to the shell whether a command is provided as builtin
> or not. I've tried with ksh, which has a builtin command that shows
> all the builtins, but you can also use an own test (disabling PATH)
>
> $ bash -c '( PATH= ; nohup sleep 1 )'
> bash: nohup: No such file or directory
>
> (or use 'which' or 'whence -a' depending on your system environment
> or shell). Also in Ksh (and I think in Bash as well) it's possible
> to implement a builtin nohup and dynamically load it as builtin, so
> it's also no static property of any shell but depends on the actual
> system. It boils down to not making any assumptions about builtins,
> unless the standardized ones.
>
> Janis
>

Read his sig. It's csh by the looks.

--
Chris Elvidge
England

Re: nohup while ...

<sq5ofc$sdu$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4804&group=comp.unix.shell#4804

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jmccue@fuzzball.mhome.org (John McCue)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 00:26:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <sq5ofc$sdu$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com> <sq4htl$lo5$1@dont-email.me> <sq4i72$r9a$1@dont-email.me> <sq5c47$nio$1@dont-email.me> <sq5ms4$ls4$1@dont-email.me>
Reply-To: jmclnx@SPAMisBADgmail.com
Injection-Date: Sat, 25 Dec 2021 00:26:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f9ef47d1c56de7a3dcaa24f9c8accdaa";
logging-data="29118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+stwr8UZGAgA9HzSeJJBdP"
User-Agent: tin/2.4.4-20191224 ("Millburn") (OpenBSD/7.0 (amd64))
Cancel-Lock: sha1:9ERt9XNdXjG58xkkNMUDMqEn6so=
X-OS-Version: OpenBSD 7.0 amd64
 by: John McCue - Sat, 25 Dec 2021 00:26 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 24.12.2021 21:55, John McCue wrote:
>> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> On 24.12.2021 14:28, John McCue wrote:
<snip>
> Out of curiosity; which shell is that?

On Linux/BSD tcsh, at work csh on aix.

> Janis

--
csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars

Re: nohup while ...

<sq5oib$sdu$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4805&group=comp.unix.shell#4805

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jmccue@fuzzball.mhome.org (John McCue)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 00:27:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <sq5oib$sdu$2@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com> <sq4htl$lo5$1@dont-email.me> <87ilvd4ph7.fsf@nosuchdomain.example.com>
Reply-To: jmclnx@SPAMisBADgmail.com
Injection-Date: Sat, 25 Dec 2021 00:27:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f9ef47d1c56de7a3dcaa24f9c8accdaa";
logging-data="29118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mSajC+KPyiGRo7VjSu4L/"
User-Agent: tin/2.4.4-20191224 ("Millburn") (OpenBSD/7.0 (amd64))
Cancel-Lock: sha1:QdpSChG3qt0altLRAWbHni937gU=
X-OS-Version: OpenBSD 7.0 amd64
 by: John McCue - Sat, 25 Dec 2021 00:27 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> John McCue <jmccue@fuzzball.mhome.org> writes:
> [...]
>> nohup here is a builtin too, there is an external nohup
>> but you need specify something like /usr/bin/nohup
>> instead.
> [...]
>
> nohup is a builtin in csh and tcsh, not in bash, ksh, or zsh.
>
> If you're using csh, it's definitely worth mentioning that fact.

Only on aix, but on systems that come with tcsh, I use that :)

--
csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars

Re: nohup while ...

<sq5pn6$3ft$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4806&group=comp.unix.shell#4806

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 01:47:33 +0100
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <sq5pn6$3ft$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <87ilvd4ph7.fsf@nosuchdomain.example.com>
<sq5oib$sdu$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 25 Dec 2021 00:47:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="30a8a76792030918f4e32592cbf8a933";
logging-data="3581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pWD6FrK7JrfrZFEiYCIjF"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:86sSSCwBgn85gBgP5h1qK1RFOSk=
In-Reply-To: <sq5oib$sdu$2@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Sat, 25 Dec 2021 00:47 UTC

On 25.12.2021 01:27, John McCue wrote:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>> John McCue <jmccue@fuzzball.mhome.org> writes:
>> [...]
>>> nohup here is a builtin too, there is an external nohup
>>> but you need specify something like /usr/bin/nohup
>>> instead.
>> [...]
>>
>> nohup is a builtin in csh and tcsh, not in bash, ksh, or zsh.
>>
>> If you're using csh, it's definitely worth mentioning that fact.
>
> Only on aix, but on systems that come with tcsh, I use that :)

The problem is that the OP used a sh based shell - the shell family
used for programming (as opposed to the csh family, deprecated for
that purpose) -, and so it's misleading to inspect ones interactive
csh based shell to test for the buitin status of a command used in
the actually used shell for programming. That had been irritating me,
more so after testing a couple of sh based shells, that's why I asked.

Janis

Re: nohup while ...

<3343dddf-e18e-46ec-9f13-f01c1aba2e48n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4807&group=comp.unix.shell#4807

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:7dcd:: with SMTP id c13mr7514992qte.133.1640395966111;
Fri, 24 Dec 2021 17:32:46 -0800 (PST)
X-Received: by 2002:a05:6214:27c6:: with SMTP id ge6mr7607459qvb.83.1640395965992;
Fri, 24 Dec 2021 17:32:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 24 Dec 2021 17:32:45 -0800 (PST)
In-Reply-To: <87ilvd4ph7.fsf@nosuchdomain.example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=203.175.13.138; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 203.175.13.138
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <87ilvd4ph7.fsf@nosuchdomain.example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3343dddf-e18e-46ec-9f13-f01c1aba2e48n@googlegroups.com>
Subject: Re: nohup while ...
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Sat, 25 Dec 2021 01:32:46 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: hongy...@gmail.com - Sat, 25 Dec 2021 01:32 UTC

On Saturday, December 25, 2021 at 6:17:46 AM UTC+8, Keith Thompson wrote:
> John McCue <jmc...@fuzzball.mhome.org> writes:
> [...]
> > nohup here is a builtin too, there is an external nohup
> > but you need specify something like /usr/bin/nohup
> > instead.
> [...]
>
> nohup is a builtin in csh and tcsh, not in bash, ksh, or zsh.

Yep. As shown below:

$ csh -c '( set PATH= ; nohup sleep 1 )'
$ tcsh -c '( set PATH= ; nohup sleep 1 )'
$ bash -c '( PATH= ; nohup sleep 1 )'
bash: nohup: No such file or directory
$ zsh -c '( PATH= ; nohup sleep 1 )'
zsh:1: command not found: nohup
$ ksh -c '( PATH= ; nohup sleep 1 )'
ksh: nohup: not found


> If you're using csh, it's definitely worth mentioning that fact.
> --
> Keith Thompson (The_Other_Keith) Keith.S.T...@gmail.com
> Working, but not speaking, for Philips
> void Void(void) { Void(); } /* The recursive call of the void */

Re: nohup while ...

<WxlIt1h7l9Si8NUdt@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4808&group=comp.unix.shell#4808

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 02:05:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <WxlIt1h7l9Si8NUdt@bongo-ra.co>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com> <sq4htl$lo5$1@dont-email.me> <87ilvd4ph7.fsf@nosuchdomain.example.com>
<sq5oib$sdu$2@dont-email.me> <sq5pn6$3ft$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 25 Dec 2021 02:05:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="aa767d46867b91718ac84d71626f4135";
logging-data="23966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OITUacUsyWrTdk927YmQa"
Cancel-Lock: sha1:3PnqJ7/r7xJpOhxeAlZYa9vDE8M=
In-Reply-To: <sq5pn6$3ft$1@dont-email.me>
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
 by: Spiros Bousbouras - Sat, 25 Dec 2021 02:05 UTC

On Sat, 25 Dec 2021 01:47:33 +0100
Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 25.12.2021 01:27, John McCue wrote:
> > Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> >> John McCue <jmccue@fuzzball.mhome.org> writes:
> >> [...]
> >>> nohup here is a builtin too, there is an external nohup
> >>> but you need specify something like /usr/bin/nohup
> >>> instead.
> >> [...]
> >>
> >> nohup is a builtin in csh and tcsh, not in bash, ksh, or zsh.
> >>
> >> If you're using csh, it's definitely worth mentioning that fact.
> >
> > Only on aix, but on systems that come with tcsh, I use that :)
>
> The problem is that the OP used a sh based shell - the shell family
> used for programming (as opposed to the csh family, deprecated for
> that purpose) -, and so it's misleading to inspect ones interactive
> csh based shell to test for the buitin status of a command used in
> the actually used shell for programming.

What shell one uses for programming is up to personal taste so it's
meaningless to say things like "the shell family used for programming" or
"deprecated for that purpose" or "the actually used shell for programming".
However <sq4htl$lo5$1@dont-email.me> has
{ hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
> I've the following bash script:
>
> ------- begin --------
> #!/usr/bin/env bash
>
> nohup while :; do
while is a built in, no need for that here

> if some-cond; then
> nohup some-command &>/dev/null &

nohup here is a builtin too, there is an external nohup
but you need specify something like /usr/bin/nohup
instead.
} So it quotes code which explicitly mentions BASH .In such a context , it
seems to me that the natural interpretation of "nohup here is a builtin too"
is that some version of BASH is being referenced. Since John really meant
(t)csh , he should have made that explicit.

--
Criticizing Asimov because his characters aren't as good as Jane
Austen's strikes me as being like criticizing Pride and Prejudice
because it doesn't have any robots.
Pete McCutchen

Re: nohup while ...

<sq6pka$avg$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4809&group=comp.unix.shell#4809

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 10:52:10 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <sq6pka$avg$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <87ilvd4ph7.fsf@nosuchdomain.example.com>
<sq5oib$sdu$2@dont-email.me> <sq5pn6$3ft$1@dont-email.me>
<WxlIt1h7l9Si8NUdt@bongo-ra.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 25 Dec 2021 09:52:10 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c07d0dc0bec2b3efe073848d1e077552";
logging-data="11248"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+TBCFNwkVkh5wwCbZ75Td"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:cz3v07t+lHkblIWUJtoMwW0rrls=
In-Reply-To: <WxlIt1h7l9Si8NUdt@bongo-ra.co>
 by: Janis Papanagnou - Sat, 25 Dec 2021 09:52 UTC

On 25.12.2021 03:05, Spiros Bousbouras wrote:
> On Sat, 25 Dec 2021 01:47:33 +0100
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>
>> The problem is that the OP used a sh based shell - the shell family
>> used for programming (as opposed to the csh family, deprecated for
>> that purpose) -, and so it's misleading to inspect ones interactive
>> csh based shell to test for the buitin status of a command used in
>> the actually used shell for programming.
>
> What shell one uses for programming is up to personal taste

Yes.

> so it's
> meaningless to say things like "the shell family used for programming" or
> "deprecated for that purpose" or "the actually used shell for programming".

No.

Janis

Re: nohup while ...

<sq6r38$j1j$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=4810&group=comp.unix.shell#4810

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: nohup while ...
Date: Sat, 25 Dec 2021 11:17:12 +0100
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <sq6r38$j1j$1@dont-email.me>
References: <0672e34f-a141-4821-9849-209da7ce31b7n@googlegroups.com>
<sq4htl$lo5$1@dont-email.me> <87ilvd4ph7.fsf@nosuchdomain.example.com>
<sq5oib$sdu$2@dont-email.me> <sq5pn6$3ft$1@dont-email.me>
<WxlIt1h7l9Si8NUdt@bongo-ra.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 25 Dec 2021 10:17:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c07d0dc0bec2b3efe073848d1e077552";
logging-data="19507"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wA4MbVSLfVCANCN/GcHYm"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:kE5wLKso8heFINFlcUnFTp1BryE=
In-Reply-To: <WxlIt1h7l9Si8NUdt@bongo-ra.co>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Sat, 25 Dec 2021 10:17 UTC

On 25.12.2021 03:05, Spiros Bousbouras wrote:
> On Sat, 25 Dec 2021 01:47:33 +0100
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> On 25.12.2021 01:27, John McCue wrote:
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>>> John McCue <jmccue@fuzzball.mhome.org> writes:
>>>> [...]
>>>>> nohup here is a builtin too, there is an external nohup
>>>>> but you need specify something like /usr/bin/nohup
>>>>> instead.
>>>> [...]
>>>>
>>>> nohup is a builtin in csh and tcsh, not in bash, ksh, or zsh.
>>>>
>>>> If you're using csh, it's definitely worth mentioning that fact.
>>>
>>> Only on aix, but on systems that come with tcsh, I use that :)
>>
>> The problem is that the OP used a sh based shell - the shell family
>> used for programming (as opposed to the csh family, deprecated for
>> that purpose) -, and so it's misleading to inspect ones interactive
>> csh based shell to test for the buitin status of a command used in
>> the actually used shell for programming.
>
> [...]
>
> So it quotes code which explicitly mentions BASH .In such a context , it
> seems to me that the natural interpretation of "nohup here is a builtin too"
> is that some version of BASH is being referenced. Since John really meant
> (t)csh , he should have made that explicit.

The poster used code for shells usually taken for programming, but
more importantly code that won't run in the csh family of shells.
One aspect is that (some/most) folks use one shell for interactive
use and another shell for programming. If these shells differ WRT
the shell family one should not interactively test [programmable]
shell behavior while working with that interactive shell. That was
the point of my reply.

We agree (and had already agreed) that this should be made explicit.

Janis

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor