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 can see it within the bash source code mirror on GitHub. Where does it come from if it is not supposed to exist? Sorry, but something is really confusing here.


Example usage: https://gitlab.archlinux.org/archlinux/devtools/-/blob/master/src/makechrootpkg.in?ref_type=heads#L152

arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
        bash -c 'yes y | pacman -U -- "$@"' -bash "${pkgnames[@]/#//root/}"


Bash source code on GitHub mirror: https://github.com/bminor/bash/blob/master/y.tab.c#L3967

"(--bash_input.location.string) = c;"


Yours sincerely,
Klaus Frank

On 2023-11-28 15:30:20, Andreas Schwab wrote:
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 docker: `echo test1234 | bash -c "echo $@"`, `bash -c "echo $@" -bash
"test1234"`, `bash -c "echo $@" -bash_input "test1234"`.
The first argument passed after -c ... is just a placeholder here, it is
used to set the $0 special parameter.

$ bash -c 'echo $0 $2 $1' foo bar mumble
foo mumble bar

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to