nary data doesn't work if you're reading newline-terminated
> records, because you cannot store the NUL character in a shell
> variable. But you can delimit your records on NULs, and use printf to
> reproduce them.
Though that will likely add a spurious null at EOF.
--
Andreas Schwab,
n later kernels, but nevertheless,
bash should pass MFD_NOEXEC_SEAL (if defined) when it calls
memfd_create.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
?aa'
> # touch 'something-else'
> # rmdir :
>
> ... produces nothing until pressing the tab key a second time, after which
> both entries are listed while the content of readline's input buffer remains
> unchanged.
':' is in $COMP_WORDBREAKS.
--
Andrea
On Apr 28 2024, Chet Ramey wrote:
> On 4/27/24 8:09 AM, Andreas Schwab wrote:
>> On Apr 27 2024, Kerin Millar wrote:
>>
>>> At some point after upgrading to bash-5.3-alpha, the following message
>>> appeared in my kernel ring buffer.
>>>
>>> [
from a terminal.
Since the redirection fails and the cat command is never started, bash
doesn't switch the terminal process group, and the background wc command
goes on competing with bash for the terminal.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
bash switches the terminal process group back before the
background process starts reading from the terminal (won't happen in
this example since the cat command blocks on reading the process
substitution file).
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69
TRING}.
--
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."
thing like SIGHUP.
But leaving it in the process group of the parent shell does not
accomplish that, which is actually the point of this thread. A process
substitution is similar to a pipeline; it really belongs to the process
group of the command that reads from it.
--
Andreas Schwab, SUSE Labs,
is wider than int, it can
return a wrong value even if the subtraction doesn't overflow.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Why do you think this is a bug in bash? You are telling the shell to
export any modified variable, and you get what you asked for.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
4 echo 1234
5 history
bash-5.3$ echo 2345
2345
bash-5.3$ history
1 echo 1234
2 echo 2345
3 echo 13456
4 echo 21234
5 history
6 echo 2345
7 history
bash-5.3$ exit
$ cat history
echo 1234
echo 2345
echo 3456
echo 21234
history
echo 2345
history
--
Andreas S
which happens to
> leave the `echo 3456' unchanged -- coincidentally the first history entry
> changed by moving around the history list and editing.
So what did change in 5.3 that this is now broken?
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4
On Jul 01 2024, Chet Ramey wrote:
> On 7/1/24 3:54 AM, Andreas Schwab wrote:
>
>> So what did change in 5.3 that this is now broken?
>
> If you want to report a bug, report one. Be specific about what you
> think is wrong and what you think the correct behavior is.
The corre
The wrong thing is that the history contains commands that were never
executed: echo 13456 and echo 21234.
--
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."
On Aug 29 2024, Andrey Kovalev wrote:
> - for (fmt = format; *fmt; fmt++)
> + for (fmt = format; fmt - format < strlen(format); fmt++)
How is that different (apart from turing a linear runtime into quadratic
runtime)?
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fi
On Okt 13 2024, Oğuz wrote:
> Why though? Can't bash just close the procsub's stdin when `:' returns?
bash has no handle on the command's stdin.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And
On Okt 12 2024, Saint Michael wrote:
> After using printf, right now I need to lunch a second command if I
> need to expand the \n into real new lines.
$ printf %b '\n'
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9
> Even the venerable BASH shell still has room for modernization
> and improvement. Thank you for your interest and consideration.
How is $((10#${data_line:12:2})) not modern?
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA
What is your value of COMP_WORDBREAKS?
--
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."
pipeline are commands.
> Both other examples, e.g. 'if false; then :; fi | true',
> are, for PIPESTATUS purposes, equivalent to: 'true | true'.
Why is `if false; then :; fi' not equivalent to `true' above?
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fi
On Jan 03 2025, Dale R. Worley wrote:
> It does seem like "bind" could be improved by providing an option that
> shows all of the keysequences and what they are bound to.
bind -p | sort
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 255
On Feb 10 2025, Greg Wooledge wrote:
> No, I've shown that it *is* working in older versions of bash, and I'm
> asking *why*.
Does it? If it did, it should have printed -23, not -19.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE
On Dez 11 2024, Mike Jonkmans wrote:
> Can a command - as part of a pipeline - not be a pipeline?
! true | { ! true; }
--
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."
commands as part of
the pipeline (by your reasoning) are `false' and `true'.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
On Dez 10 2024, Mike Jonkmans wrote:
> With 'if false... fi | true' there are two pipelines:
> 1) false
> 2) (compound command) if | true
There is only one pipeline, consisting of two commands.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1
On Jan 05 2025, Tobi Laskowski wrote:
> "Additionally, if it is in the environment at start up, the variable is
> automatically exported
That is a general property of every environment variable.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510
On Dez 22 2024, Martin D Kealey wrote:
> If you don't mind even more thinking then you can instead memorize the list
> of characters that need \ and skip all the others; they are space, tab,
> newline, and "#$'&<>*()?`\[]|
Careful. \ has a different meaning.
$ PS1="\[$(tput bold)\]\w\\\$\[$(tput sgr0)\] "
$ cd /tmp
$ for i in 1 2 3 4 5 6 7 8; do mkdir 1234567890; cd 1234567890; done
The second line of the prompt is not rendered in bold, and as the edited
line gets longer the cursor jumps to the leftmost screen column.
--
Andreas S
On Mär 31 2025, Chet Ramey wrote:
> It's hard to see these as being useful if they're glibc-specific.
They are coming from ISO TR 14652 and 30112.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for so
On Mär 26 2025, Andreas Kähäri wrote:
> The argument to "bash -c"
There is no "bash -c" in that command.
--
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."
cludes putting LC_NUMERIC=C in the
temporary environment for the command).
--
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."
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."
effect.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
On Feb 22 2025, Phi Debian wrote:
> I forgot to mention your trick to nuke the fmt reuse still works
>
> $ printf '%s %s %s %999$s' A B C D E F G
> A B C
As long as NL_ARGMAX >= 999.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69
On Mai 20 2025, FunnyMan Computer wrote:
> In both cases, ${BASH_REMATCH[1]} should also have results stored.
Why? There are no subexpression in your regexps.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And
echo hello; }; declare -F'
>>declare -f <(echo hello)
>
> That's the function name. In general, a function name is a WORD that
> does not undergo any word expansions, not even quote removal.
Without quote removal, a lot of WORDs that can be command names (which
unde
That's a TOCTOU race. The file can change any time between stat and
read. The only truth is that when read returns an error, there is an
error.
> Yes. It seems like that assumption isn't valid on Linux.
It isn't valid anywhere.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Ke
eads to
>
> When I take out that macro, it doesn't change the resulting config.h, at
> least on macOS.
The defines set by the gl_FCNTL_O_FLAGS macro are missing from
config.h.in, and they are not used anywhere anyway.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint =
is a libc fork() wrapper thing.
That's actually posix_spawn.
--
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."
701 - 739 of 739 matches
Mail list logo