These examples are utilizing behavior undefined in the ERE
The asterisk, plus-sign, question-mark, and left-brace shall be special except when used in a bracket expression (see RE Bracket Expression). Any of the following uses produce undefined results:
If these characters appear first in an ERE, or immediately following an unescaped vertical-line, circumflex, dollar-sign, or left-parenthesis
GNU Grep allows them to be a part of EREs, but this can cause issues when it's used by other parts of the entrypoint script.
Is there an existing issue for this?
Describe the bug?
The readme currently contains:
These examples are utilizing behavior undefined in the ERE
GNU Grep allows them to be a part of EREs, but this can cause issues when it's used by other parts of the entrypoint script.
To Reproduce
Given a directory structure such as
and an action such as
output shows
*.sh
gets expanded by the bash entrypoint script as a glob:as opposed to the expected
What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
If *.sh is in the examples, it should work to find any files with .sh in them. If not, it should be removed from the examples along with .
Variables with expected special characters should be quoted to prevent globbing when using them in output.
Relevant log output
No response
Anything else?
For the
*.sh
example,.*\.sh
works as a replacement.https://www.gnu.org/software/grep/manual/html_node/Basic-vs-Extended.html
Code of Conduct