| Summary: | ash subshell vs. arithmetic bracket parsing issue | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Chris Renshaw <osm0sis> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED WONTFIX | ||
| Severity: | normal | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.30.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Chris Renshaw
2019-03-10 20:19:02 UTC
I'm actually surprised bash looks that far into the input to determine what $(( means. hush does not do that: (unless math support is disabled,) it will interpret $(( as the start of arithmetic substitution. Hmm, odd, you're right, I seem to have been mistaken that hush treats it differently from ash. bash and mksh however definitely do seem to be able to interpret it correctly. It's not obvious what "correctly" is.
For example, in C syntax, the longest sequence of chars which forms a valid token is taken as next token - no lookahead. In this case, this rule would see "$((" as next token.
|