Greg Wooledge wrote in
<20250618140055.gf28...@wooledge.org>:
|On Wed, Jun 18, 2025 at 04:57:01 +0300, nkkralev--- via Bug reports \
|for the GNU Bourne Again SHell wrote:
|> to occur.]#test1
|> /bin/bash -c 'set -e ; /bin/echo $(ls /doesnt_exist) ; echo print1'
|> #and the stdout/stderr disp
On 6/17/25 9:57 PM, nkkralev--- via Bug reports for the GNU Bourne Again
SHell wrote:
When we use set -e, or pass -e to bash itself, -e does process status code
checks as written in the bash man page.With some testing I think I found a few
corner cases which I am not sure if they are bugs or
On Wed, Jun 18, 2025 at 03:59:52 +, shynur . wrote:
> Martin:
> > In variables.c at line 6243 we have
> > eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10;
This use of atoi is unique to the IGNOREEOF variable and does not occur
in most other places in bash.
hobbit:/usr
On Wed, Jun 18, 2025 at 04:57:01 +0300, nkkralev--- via Bug reports for the GNU
Bourne Again SHell wrote:
> to occur.]#test1
> /bin/bash -c 'set -e ; /bin/echo $(ls /doesnt_exist) ; echo print1'
> #and the stdout/stderr displayed is:
> ls: cannot access '/doesnt_exist': No such file or directorypr
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-Smvct5/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname o
On 6/17/25 10:31 PM, shynur . wrote:
```
INT_MAX=`echo \`printf '%u' -1\`/2 | bc`
IGNOREEOF=INT_MAX
# Then I typed C-d, bash exited...
```
```
IGNOREEOF=127
# C-d, C-d, C-d, ...
```
Why doesn’t the first piece of code work as expected?
Because it's not the right way to determine INT_MAX, and
u can try
trap '(( $? )) && exit 2' debug
On Wed, Jun 18, 2025, 5:05 PM Steffen Nurpmeso wrote:
> Greg Wooledge wrote in
> <20250618140055.gf28...@wooledge.org>:
> |On Wed, Jun 18, 2025 at 04:57:01 +0300, nkkralev--- via Bug reports \
> |for the GNU Bourne Again SHell wrote:
> |> to occur.]
try x() first
then alias
On Wed, Jun 18, 2025, 7:30 PM Stan Marsh wrote:
> This is a "Doctor, it hurts when I do this" type thing.
>
> The short answer is that alias substitution occurs very early, so when you
> type:
>
> alias x='this and that'
> x() { ... }
>
> you are for all practica
On Thu, 19 Jun 2025 at 07:37, Alvaro Falagan
wrote:
> Bash does not clean up all its internal memory and leaves at least one file
> descriptor (`/dev/pts/0`, fd 255) open at exit.
Why would it be a problem if memory is still allocated or filedescriptors
are still open at exit?
Memory pages and
u first define func
then u use aliases
On Wed, Jun 18, 2025, 10:05 PM Alberto Millán wrote:
> First of all, I'd like to thank you for your responses.
>
> Okay, now I understand a little better what's going on with recursion.
>
> In most cases, I can now see what's wrong, but there's one specific
On 6/18/25 4:05 PM, Alberto Millán wrote:
First of all, I'd like to thank you for your responses.
Okay, now I understand a little better what's going on with recursion.
In most cases, I can now see what's wrong, but there's one specific case
where I can't quite figure out what's wrong.
bash
This is a "Doctor, it hurts when I do this" type thing.
The short answer is that alias substitution occurs very early, so when you type:
alias x='this and that'
x() { ... }
you are for all practical purposes, typing:
'this and that'() { ... }
At which point, anything can happen. I
On 6/18/25 11:38 AM, Alberto Millán wrote:
Bash Version: 5.2
Patch Level: 37
Release Status: release
Description:
When I define an alias and a function with the same name, I experience
abnormal behavior.
It seems to be especially dangerous when using a colon.
I think there is a misu
```
u can try
trap '(( $? )) && exit 2' debug
```
I mean, I know that $? doesn't detect the tests I posted in my first email,
even if we do
bash -e -c 'echo $(exit 1) ; echo survived'
We see that survived is printed, this trap snippet you wrote here seems to
duplicate what set -e does? I repea
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
uname output: Linux ALBERTO 6.6.87.2-microsoft-standard-WSL2 #1 SMP
PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x8
Oh, okay. Now everything is much clearer.
Seeing this, I can understand, for example, why if I run this twice, the
first time I get the output of the 'id' command and the second time the
output of the 'pwd' command.
alias id=pwd;id # id output.
alias id=pwd;id # pwd output.
Thank you again fo
On Wed, Jun 18, 2025 at 9:31 AM Alberto Millán wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -g -O2
> uname output: Linux ALBERTO 6.6.87.2-microsoft-standard-WSL2 #1 SMP
> PREEMPT_DYNAMIC Thu Ju
First of all, I'd like to thank you for your responses.
Okay, now I understand a little better what's going on with recursion.
In most cases, I can now see what's wrong, but there's one specific case
where I can't quite figure out what's wrong.
bash -ic $'alias x=:\nx(){ id;};x' # This case cra
18 matches
Mail list logo