[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Missing documentation "-bash_input"
From: |
Klaus Frank |
Subject: |
Missing documentation "-bash_input" |
Date: |
Tue, 28 Nov 2023 10:55:09 +0000 |
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
smime.p7s
Description: S/MIME Cryptographic Signature
- Missing documentation "-bash_input",
Klaus Frank <=
- Re: Missing documentation "-bash_input", Andreas Schwab, 2023/11/28
- Re: Missing documentation "-bash_input", Klaus Frank, 2023/11/28
- Re: Missing documentation "-bash_input", Greg Wooledge, 2023/11/28
- Re: Missing documentation "-bash_input", Lawrence Velázquez, 2023/11/28
- Re: Missing documentation "-bash_input", Klaus Frank, 2023/11/28
- Re: Missing documentation "-bash_input", Greg Wooledge, 2023/11/28
- Re: Missing documentation "-bash_input", Oğuz, 2023/11/28
- Re: Missing documentation "-bash_input", Robert Elz, 2023/11/29