e simply have a nomaal
shell which reads stdin for commands, uses its own name as
$0 (which it also does with -s, or with -c when no replacement $0
is given) and is interactive if stdin and stderr are terminals
(and in some shells, if -i was given, but don't rely upon that).
And then:
| From:
On Wednesday, November 29, 2023, Klaus Frank wrote:
> One thing though, I probably should already know that, but why is a $0
> needed even though a command was already specified? Shouldn't the command
> itself be $0?
No, $0 is used in error messages:
$ bash -c '"' foo
foo: -c: line 1:
On Wed, Nov 29, 2023 at 12:37:55AM +, Klaus Frank wrote:
> One thing though, I probably should already know that, but why is a $0
> needed even though a command was already specified? Shouldn't the command
> itself be $0?
It's simply how sh -c has always worked. The first argument after -c
is
Hi,
thanks for the explanation. Esp. the parsing one at the bottom, that
explains why my tests were false positive.
One thing though, I probably should already know that, but why is a $0
needed even though a command was already specified? Shouldn't the
command itself be $0?
On 2023-11-29
On Tue, Nov 28, 2023, at 5:33 PM, Klaus Frank wrote:
> sorry, but this is not true
It is true.
> I can clearly see that it exists. It may be
> an distro addition though. Is it specific to ArchLinux? Because I can
> see it being used and when I try to use it on my system it also clearly
> work
On Tue, Nov 28, 2023 at 10:33:20PM +, Klaus Frank wrote:
> sorry, but this is not true, I can clearly see that it exists. It may be an
> distro addition though. Is it specific to ArchLinux?
Here's what I get on Debian:
unicorn:~$ bash -bash_input foobar -c 'read; declare -p REPLY'
bash: -_: i
Hi,
sorry, but this is not true, I can clearly see that it exists. It may be
an distro addition though. Is it specific to ArchLinux? Because I can
see it being used and when I try to use it on my system it also clearly
works. But against it just being a distro specific thing is that I also
ca
On Nov 28 2023, Klaus Frank wrote:
> I just noticed that the man pages are missing documentation for the
> "-bash" (or better "-bash_input") parameter.
There is no such thing as a -bash or -bash_input parameter.
> be better readable when being passed as an argument itself to e.g. nspawn
> or doc
Hi,
I just noticed that the man pages are missing documentation for the
"-bash" (or better "-bash_input") parameter.
I just found the "-bash" parameter in a script and couldn't find any
documentation about it, after checking out the source code I found
"-bash_input" which after some testing