| Summary: | awk: improperly initialised field reference | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | ocbb23b |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | normal | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.35.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
ocbb23b
2023-12-10 16:10:57 UTC
root@clean2305:~# (echo a; echo b) | awk 'BEGIN {ignore=$1} $2 != 0'
b
root@clean2305:~# (echo a; echo b) | awk 'BEGIN {ignore=$4} $2 != 0'
a
b
root@clean2305:~#
This is another example of the problem. Note that if we reference $4, then the initialisation is done right for the first line
|