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 is the code path "-bash" is somehow also pointing to. Could some documentation about this parameter be added to the man pages?

It is defined in y.tab.c in line 3945 as part of yy_string_get and in code it is documented with "Let input come from STRING. STRING is zero terminated." meaning it uses the provided argument instead of stdin. Therefore these are equivalent but with the bash parameter it may 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 section in the docs could be something like:

```
-bash_input, -bash: Can be used in scripts to provide pipe input to bash itself. This is especially useful when calling bash has to be wrapped within another command like chroot
E.g. `chroot /path /bin/bash -c "echo $@" -bash "pipe input"`
```

Yours sincerely,
Klaus Frank

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

Reply via email to