Re: /dev/tcp feature request...

2025-04-08 Thread MacBeth
On Tue, Apr 8, 2025 at 8:54 AM MacBeth wrote: > > On Mon, Apr 7, 2025 at 5:37 PM A. James Lewis wrote: > > > > I have always attempted to avoid > > using external programs where functionality within bash can meet a > > requirement. Doing this allows my scripts to be more reliable, and not > > de

Re: /dev/tcp feature request...

2025-04-08 Thread MacBeth
On Tue, Apr 8, 2025 at 7:16 AM Zachary Santer wrote: > > Is there a good tutorial on how to actually use /dev/tcp? > I found a number of helpful results on google... https://www.google.com/search?q=%2Fdev%2Ftcp For instance: https://medium.com/@stefanos.kalandaridis/bash-ing-your-network-

Re: /dev/tcp feature request...

2025-04-08 Thread Zachary Santer
On Tue, Apr 8, 2025 at 7:04 AM Greg Wooledge wrote: > > On Tue, Apr 08, 2025 at 06:34:50 +0300, Oğuz wrote: > > On Tuesday, April 8, 2025, A. James Lewis wrote: > > > I have however found it extremely frustrating to open TCP connections > > > via /dev/tcp, because there appears to be no way to co

Problem in trap help message

2025-04-08 Thread Rafael Fontenelle via Bug reports for the GNU Bourne Again SHell
Translating bash 5.3-pre1, I faced a string change in trap's help message that I didn't quite understand. The phrase in 5.3-pre1: --- If a SIGNAL_SPEC is DEBUG, ACTION is executed before every simple command and selected other commands. --- The "and selected other commands" part was added in this

Re: /dev/tcp feature request...

2025-04-08 Thread Greg Wooledge
On Tue, Apr 08, 2025 at 06:34:50 +0300, Oğuz wrote: > On Tuesday, April 8, 2025, A. James Lewis wrote: > > I have however found it extremely frustrating to open TCP connections > > via /dev/tcp, because there appears to be no way to control the > > timeout! > > Same. It'd be nice if bash gave up

Re: /dev/tcp feature request...

2025-04-08 Thread MacBeth
On Mon, Apr 7, 2025 at 5:37 PM A. James Lewis wrote: > > I have always attempted to avoid > using external programs where functionality within bash can meet a > requirement. Doing this allows my scripts to be more reliable, and not > depend on those external tools being installed... > > I have ho

Re: /dev/tcp feature request...

2025-04-08 Thread MacBeth
On Tue, Apr 8, 2025 at 8:54 AM MacBeth wrote: > > script begin ... sample output being: $ . tcp.sh HTTP/1.0 200 OK Done with: www.google.com HTTP/1.0 200 OK Done with: www.example.com sleeping... waiting on 8.8.8.9 sleeping... waiting on 8.8.8.9 sleeping... waiting on 8.8.8.9 sleeping... wa

Re: Problem in trap help message

2025-04-08 Thread Chet Ramey
On 4/8/25 3:55 PM, Rafael Fontenelle via Bug reports for the GNU Bourne Again SHell wrote: Translating bash 5.3-pre1, I faced a string change in trap's help message that I didn't quite understand. The phrase in 5.3-pre1: --- If a SIGNAL_SPEC is DEBUG, ACTION is executed before every simple comma

Re: Support ksh93 x=${cmd;}

2025-04-08 Thread Sam James
Cedric Blancher writes: > Good morning! > > Could bash please support x=${cmd;} alongside x=$(cmd)? > > x=$(cmd;} works like x=$(cmd), except that cmd does not run in > a subshell, i.e. the stdout within ${cmd;} is redirected to the > variable "x", but any other changes of variables (global/stati

Bash-5.3-rc1 available

2025-04-08 Thread Chet Ramey
The first release candidate of bash-5.3 is now available with the URLs ftp://ftp.cwru.edu/pub/bash/bash-5.3-rc1.tar.gz https://ftp.gnu.org/pub/gnu/bash/bash-5.3-rc1.tar.gz and from the bash-5.3-testing branch in the bash git repository (http://git.savannah.gnu.org/cgit/bash.git/log/?h=bash-5.3-te

Re: /dev/tcp feature request...

2025-04-08 Thread microsuxx
[[ -d /proc/"$!" ]] On Tue, Apr 8, 2025, 16:33 Andreas Schwab wrote: > On Apr 08 2025, MacBeth wrote: > > > while ((dur /dev/null; do > > You can use kill -0 $! to check if the process still exists. > > -- > Andreas Schwab, SUSE Labs, sch...@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 197

Re: /dev/tcp feature request...

2025-04-08 Thread Andreas Schwab
On Apr 08 2025, MacBeth wrote: > while ((dur /dev/null; do You can use kill -0 $! to check if the process still exists. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Support ksh93 x=${cmd;}

2025-04-08 Thread Cedric Blancher
Good morning! Could bash please support x=${cmd;} alongside x=$(cmd)? x=$(cmd;} works like x=$(cmd), except that cmd does not run in a subshell, i.e. the stdout within ${cmd;} is redirected to the variable "x", but any other changes of variables (global/static/local) are also available outside ${